Thread: convertfen.c:61:1: warning: no newline at end of file = ???

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    78

    convertfen.c:61:1: warning: no newline at end of file = ???

    convertfen.c:61:1: warning: no newline at end of file


    What is this trying to warn me about?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    That right at the end of your source file, you are missing a blank line.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Last edited by Matticus; 06-22-2011 at 08:17 PM.

  4. #4
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,949
    Quote Originally Posted by Adam Rinkleff View Post
    convertfen.c:61:1: warning: no newline at end of file
    What is this trying to warn me about?
    Quote Originally Posted by laserlight View Post
    That right at the end of your source file, you are missing a blank line.
    Laser, how do you get these divine insights?

  5. #5
    Registered User
    Join Date
    Apr 2006
    Posts
    2,149
    ISO C requires that c files end with a newline.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

  6. #6
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    Quote Originally Posted by AndrewHunter View Post
    Laser, how do you get these divine insights?
    Translating such an obscure compiler message such as this one either takes centuries of experience or a blood sacrifice to the elder compiler gods for a blessing of their great wisdom. The insight is thus indeed of divine origins.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 02-26-2009, 12:24 PM
  2. Newline writing to a file
    By automagician in forum C Programming
    Replies: 7
    Last Post: 05-08-2005, 01:22 AM
  3. how to detect newline in a *txt file
    By lwong in forum C Programming
    Replies: 3
    Last Post: 10-19-2003, 10:52 PM
  4. Replies: 5
    Last Post: 03-16-2003, 05:58 PM
  5. Reading data from a file till there is a newline?
    By mackol in forum C Programming
    Replies: 18
    Last Post: 06-27-2002, 10:22 PM