Public Group

# Still problem with "no newline at end of file"

This topic is 4921 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello everyone! I can't eliminate this error [Warning] no newline at end of file / with Dev- C++ 4.9.9.1. Please help, it will be appreciated! http://www.geocities.com/drjulio2001 Julio Cruz

##### Share on other sites
make sure that at the end of every file there is a newline. a newline is just an empty line.

furthermore, it's just a warning, so you can safely ignore it if you wish. cheers.

##### Share on other sites
I'll ignore it for now!

Thanks a lot!

Julio Cruz

##### Share on other sites
I have a soluction to this problem with Dev- C++ [Warning] no newline at end of file! problem. Most of us know that when we make a new source file; it is a blank page right, well, if you go to Tools->Editors Options->Code Tab->Default Source Tab of the bottom of that page we could set up the source code you want to appear when you click [New Source] bottom in Dev- C++. If you do this it well solve the problem!

#include <stdio.h>int main(){  system("PAUSE"); return 0;}

or

#include <cstdlib>#include <iostream>using namespace std;int main(int argc, char *argv[]){    system("PAUSE");    return EXIT_SUCCESS;}

That sould work fine, but for there is a better soluction then this, please post it, I would really would appreciate it. Thanks!

Julio A. Cruz

##### Share on other sites
You can just ignore the warning or you can scroll to the last line in the file and just press enter which'll fix it. No need to mess around with the editor settings.

##### Share on other sites
For good style, go to the bottom of every file in your project and insert the following comment:

/* EOF */

Make sure you press ENTER after the comment. Then, don't write anything below the line and you'll never have a problem with it again.

Thanks!

I'll make sure.

Julio A. Cruz

• 11
• 20
• 12
• 10
• 38
• ### Forum Statistics

• Total Topics
631401
• Total Posts
2999865
×