Thread: beginner...HELP! PLEASEEEEE

  1. #1
    <3 girls, britney, ashlee
    Join Date
    Jun 2004
    Posts
    1

    Question beginner...HELP! PLEASEEEEE

    12undefinedundefined
    i try to do a simple .c file and it says "warning: no newline at end of file" can someone tell me why? e-mail me if you want. thanks.
    ~MJ~

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Perhaps you should add a new line to end the file.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Jun 2004
    Posts
    93
    Quote Originally Posted by quzah
    Perhaps you should add a new line to end the file.

    Quzah.
    Where'd you get that idea?

    That's just crazy enough to work.

    If you post the code though MJ, people will have a better idea.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    > If you post the code though MJ, people will have a better idea.
    Because a missing newline shows up really well when posted on the board right?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    Jun 2004
    Posts
    93
    Quote Originally Posted by Salem
    Because a missing newline shows up really well when posted on the board right?
    Don't be silly, you can't post something that's missing.

  6. #6
    Registered User
    Join Date
    Jun 2004
    Posts
    1
    If you post nothing in the woods, and no one is there to read it, does it generate a new line?

  7. #7
    ---
    Join Date
    May 2004
    Posts
    1,379
    Quote Originally Posted by swampwaterwes
    If you post nothing in the woods, and no one is there to read it, does it generate a new line?
    your first post here and that is the best you can come up with?

  8. #8
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >your first post here and that is the best you can come up with?
    I've seen worse.
    My best code is written with the delete key.

  9. #9
    Me -=SoKrA=-'s Avatar
    Join Date
    Oct 2002
    Location
    Europe
    Posts
    448
    Anyway...
    The reason you should put a blank line at the end of your files is that when the preprocessor joins the suorces into a single file, you could get the last word of the header as part of the first word of the source file.
    Adding a blank line avoids any problems you may have because of that. Also, it removes the warning.
    SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
    I say what I say, I mean what I mean.
    IDE: emacs + make + gcc and proud of it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Same old beginner question...
    By Sharmz in forum C Programming
    Replies: 15
    Last Post: 08-04-2008, 11:48 AM
  2. Replies: 5
    Last Post: 09-05-2005, 06:26 AM
  3. What are some good beginner programs I shouold make?
    By oobootsy1 in forum C# Programming
    Replies: 6
    Last Post: 08-09-2005, 02:02 PM
  4. Windows programming for beginner (Absolute beginner)
    By WDT in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2004, 11:21 AM