“No newline at end of file” compiler warning

后端 未结 11 990
逝去的感伤
逝去的感伤 2020-11-27 09:50

What is the reason for the following warning in some C++ compilers?

No newline at end of file

Why should I have an empty line at

11条回答
  •  死守一世寂寞
    2020-11-27 10:39

    I am using c-free IDE version 5.0,in my progrm either of 'c++' or 'c' language i was getting same problem.Just at the end of the program i.e. last line of the program(after braces of function it may be main or any function),press enter-line no. will be increased by 1.then execute the same program,it will run without error.

提交回复
热议问题