簡體   English   中英

Linux終端(C語言)上的Hello.c錯誤

[英]Hello.c Error on Linux Terminal (C Language)

我輸入到終端:

[File: hello/hello.c]
#include <stdio.h>
int main()
{
     printf("Hello World\n");
     return (0);
}

終端退回了兩個錯誤:

     hello.c:1:1: error: expected identifier or ‘(’ before ‘[’ token
     [File: hello/hello.c]
     ^
     hello.c:2:19: fatal error: stdio.h: No such file or directory
     compilation terminated.

我想澄清一下我在這里做錯了什么。 先感謝您。

[File: hello/hello.c] 不應被放置在頂層。 只需刪除或注釋掉即可。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM