我在终端输入:
[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]
应该不放在顶层。
只需将其删除或注释掉即可。
关于c - Linux终端上的Hello.c错误(C语言),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49787720/