LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   adding new line at end of file (https://www.linuxquestions.org/questions/programming-9/adding-new-line-at-end-of-file-113648/)

airikah 11-07-2003 11:51 PM

adding new line at end of file
 
I am trying to add a new line at the end of my main.cpp file. This is a result of a compiler error that says i do not have a new line at the end of the file. What code do I add to my file to make it complile?

chewysplace 11-08-2003 01:53 AM

try checking your brackets "{}" make shure they all have matchs

megaspaz 11-08-2003 03:45 AM

it's not a compiler error but a warning (at least for me). gcc seems to like having a newline at the end of source files but it doesn't affect the compilation. just open up your source file in an editor and set the cursor to the end of the file and press the enter key. that should get rid of that warning.

chewysplace 11-08-2003 04:27 AM

well you file is *.cpp try using g++ instead


All times are GMT -5. The time now is 11:16 PM.