LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-07-2003, 11:51 PM   #1
airikah
LQ Newbie
 
Registered: Nov 2003
Location: St. Louis, MO
Distribution: remote connection to linux server
Posts: 2

Rep: Reputation: 0
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?
 
Old 11-08-2003, 01:53 AM   #2
chewysplace
Member
 
Registered: Sep 2003
Distribution: Slackware 10 w/ Kernel 2.6.8
Posts: 176

Rep: Reputation: 30
try checking your brackets "{}" make shure they all have matchs
 
Old 11-08-2003, 03:45 AM   #3
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
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.
 
Old 11-08-2003, 04:27 AM   #4
chewysplace
Member
 
Registered: Sep 2003
Distribution: Slackware 10 w/ Kernel 2.6.8
Posts: 176

Rep: Reputation: 30
well you file is *.cpp try using g++ instead
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No new line at end of file? What does this mean? BajaNick Programming 12 05-19-2014 08:39 PM
Deleting empty line at end of text file in BASH human2.0 Linux - General 8 04-01-2009 02:44 AM
C: fread to read a file line by line until the end Blue_muppet Programming 2 09-19-2008 09:42 AM
[SOLVED] delete the end of each line in a file with sed angel115 Linux - Newbie 3 11-16-2005 04:41 PM
read the input file from the specified line no till end suchi_s Programming 5 09-09-2004 04:36 AM


All times are GMT -5. The time now is 10:39 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration