C 你好,世界没有印刷。错误
我正在学习C。我对这个问题感到沮丧至少有20分钟了。我甚至连我的hello world都无法打印出来。这个问题甚至没有被编译C 你好,世界没有印刷。错误,c,C,我正在学习C。我对这个问题感到沮丧至少有20分钟了。我甚至连我的hello world都无法打印出来。这个问题甚至没有被编译 int main() { printf("hello world"); return 0; { 给出了什么?#include//include此库头文件以使用printf() #include <stdio.h> // include this library header file to use printf() int main() {
int main()
{
printf("hello world");
return 0;
{
给出了什么?#include//include此库头文件以使用printf()
#include <stdio.h> // include this library header file to use printf()
int main()
{
printf(“Hello world.\n”);
return 0;
} // Replace “{“ with : “}”
// You were not closing the main body correctly.
int main()
{
printf(“Hello world.\n”);
返回0;
}//将“{”替换为“}”
//您没有正确关闭主体。
任何打开的都需要关闭:
return 0;
} // change to closing bracket
另外,
#如果没有,请包括
。确保包含正确的标题,并在打印邮件后请求输入。如果不打印,则可能没有足够的时间查看邮件
#include <stdio.h>
int main()
{
printf("hello world");
getchar(); //if you don't do this the hello world will be printed too fast for you to see
return 0;
}
#包括
int main()
{
printf(“你好世界”);
getchar();//如果不这样做,hello world的打印速度将过快,您无法看到
返回0;
}
首先,在发布有关编译错误的问题时,请始终在问题中包含完整且未经编辑的错误消息日志。其次,即使没有看到错误消息,我也相当确定,此处的错误消息足够清晰,您可以通过阅读找到问题所在。