View Full Version : new to the forum, need homework help :).

06-15-2008, 11:17 PM
yes, I read the rules on the homework already. I'm a newb at this so don't flame me please.

I just finished writing a simple program for an online programming course that I'm taking over the summer.

What does it mean when it says

warning: no newline at end of file

here is what i have for codes

and here is my error message

any help would be greatly appreciated.

06-15-2008, 11:34 PM
Maybe hit enter once at the end of the code?

06-15-2008, 11:36 PM
Maybe hit enter once at the end of the code?

nope... doesn't work.

06-16-2008, 05:49 AM
Did you put a newline at the end of the code or the "end of the file"?
In my experience that should do it. If not it's only a warning so the program should still work.

06-16-2008, 04:59 PM
The program will still work but what it is saying is that it wants you to have an extra new line at the end of the file. So just press enter after your very last line with that comment on it and the warning will go away.

06-17-2008, 01:19 PM
try to change the "return 0;" whit "getch();" ..

06-17-2008, 04:18 PM
try to change the "return 0;" whit "getch();" ..
That has nothing to do with the warning the OP is asking about.

06-17-2008, 06:01 PM
change notepad with an the editor that add a new line by default at the end of source file and you get rid of this message.
how other posters said before me, this don't affect execution and you could ignore it.


06-23-2008, 07:21 AM
thanks guys! it worked! woo hoo!