Thread: omitting an empty line

  1. #1
    Registered User
    Join Date
    Jan 2008

    omitting an empty line

    say I have a file:

    _____________(empty line here)
    empty :
    how do I empty the first empty line and go to the next line? I tried to do strcmp(line, "\n") == 0, but it doesn't work.. where line is the first line read?

    what should I do?

  2. #2
    Registered User dinjas's Avatar
    Join Date
    Feb 2005
    Vancouver, Washington
    try using isspace() to skip over whitespace
    straight off the heap

  3. #3
    Registered User
    Join Date
    Jul 2007
    Did you try strcmp(line,'\0') ?
    The first thing I try would be what u tried , but if it did not work maybe it could work. The func he mentioned works .

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reading a buffer line by line, while using system read
    By Hammad Saleem in forum C Programming
    Replies: 9
    Last Post: 05-27-2008, 05:41 AM
  2. line number on a rich edit control
    By rakan in forum Windows Programming
    Replies: 1
    Last Post: 02-18-2008, 06:58 AM
  3. Adding Line numbers in Word
    By Mister C in forum A Brief History of
    Replies: 24
    Last Post: 06-24-2004, 08:45 PM
  4. Trouble replacing line of file
    By Rpog in forum C Programming
    Replies: 4
    Last Post: 04-19-2004, 10:22 AM