...

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



homeryansta
06-16-2008, 12:17 AM
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
http://i102.photobucket.com/albums/m85/homeryansta/homework/programming1.jpg

and here is my error message
http://i102.photobucket.com/albums/m85/homeryansta/homework/programming2.jpg

any help would be greatly appreciated.
thanks.

Burr
06-16-2008, 12:34 AM
Maybe hit enter once at the end of the code?

homeryansta
06-16-2008, 12:36 AM
Maybe hit enter once at the end of the code?

nope... doesn't work.

Gox
06-16-2008, 06: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.

oracleguy
06-16-2008, 05: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.

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

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

oesxyl
06-17-2008, 07: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.

regards

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum