C 编译错误 warning : no newline at end of file 解决

来源:互联网 发布:淘宝买鹿王羊绒衫 编辑:程序博客网 时间:2024/06/02 05:22

在编译C文件的时候报 warning : no newline at end of file 这个错误的解决办法

原因是因为 *.c 文件的末尾需要是一新行,所以解决办法就是在 文件的最后一行回车

例子:

#include<stdio.h>int main(){puts("hello word\n");return 0; } 

在上面的中括号的下面在来一个换行 就可以了

以下是截图说明::




0 0
原创粉丝点击