reading blank rows in files

This is a discussion on reading blank rows in files within the C++ Programming forums, part of the General Programming Boards category; if I have a file which i am using for indata, can i be told that the read an empty ...

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    8

    Question reading blank rows in files

    if I have a file which i am using for indata, can i be told that the read an empty row? (ASCII)

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Try this algorithm.

    - read one line at a time using std::getline(fstreamSource, myString)
    - if myString.size() == 0, then line row is empty

    Kuphryn

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-02-2009, 06:27 AM
  2. matrix class
    By shuo in forum C++ Programming
    Replies: 2
    Last Post: 07-13-2007, 01:03 AM
  3. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 10:46 AM
  4. reading files into memory
    By bobthebullet990 in forum C Programming
    Replies: 3
    Last Post: 11-30-2005, 02:39 PM
  5. reading files
    By hiya in forum C++ Programming
    Replies: 7
    Last Post: 05-21-2005, 11:40 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21