vscode中配置C语言环境的地址
https://blog.csdn.net/qq_42428264/article/details/102149815
运行C语言代码时,需要先control+shirt+B,先编辑,再运行,否则会报错
[Running] cd “f:\c-code” && gcc hello.c -o hello && "f:\c-code"hello
C:/Program Files/MinGW-w64/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/8.1.0/…/…/…/…/x86_64-w64-mingw32/lib/…/lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x2e): undefined reference to `WinMain’
collect2.exe: error: ld returned 1 exit status
分号 ;
在 C 程序中,分号是语句结束符。也就是说,每个语句必须以分号结束。它表明一个逻辑实体的结束。
第一个hello world程序
#include <stdio.h>
int main()
{
printf("hello world");
return 0;
}
11万+

被折叠的 条评论
为什么被折叠?



