Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    new to the forum, need homework help :).

    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.
    thanks.
    Last edited by homeryansta; 06-15-2008 at 11:29 PM.

  • #2
    New Coder
    Join Date
    Dec 2006
    Posts
    42
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Maybe hit enter once at the end of the code?

  • #3
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Burr View Post
    Maybe hit enter once at the end of the code?
    nope... doesn't work.

  • #4
    Gox
    Gox is offline
    Regular Coder Gox's Avatar
    Join Date
    May 2006
    Location
    Ontario, Canada
    Posts
    392
    Thanks
    2
    Thanked 20 Times in 20 Posts
    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.

  • #5
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    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.
    OracleGuy

  • #6
    New to the CF scene
    Join Date
    May 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try to change the "return 0;" whit "getch();" ..
    Last edited by tito_moklet; 06-17-2008 at 01:25 PM.

  • #7
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Quote Originally Posted by tito_moklet View Post
    try to change the "return 0;" whit "getch();" ..
    That has nothing to do with the warning the OP is asking about.
    OracleGuy

  • #8
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    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

  • #9
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks guys! it worked! woo hoo!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •