View Single Post
Join Date: Aug 2007
Posts: 1,670
Reputation: vmanes is a splendid one to behold vmanes is a splendid one to behold vmanes is a splendid one to behold vmanes is a splendid one to behold vmanes is a splendid one to behold vmanes is a splendid one to behold vmanes is a splendid one to behold 
Solved Threads: 192
vmanes's Avatar
vmanes vmanes is offline Offline
Posting Virtuoso

Re: Line count not working....

 
0
  #2
Sep 3rd, 2008
You should check that the file actually opened.

  1. read.open(filename_user.c_str(), ios::in);
  2. if( ! read )
  3. {
  4. //error handler here
  5. }
  6. else
  7. while(getline(read, linecount, '\n'))
  8. {
  9. ++lc;
  10. }

Are you sure the data file is in the place where your program is looking for it?
"We Americans got so tired of being thought of as dumb by the rest of the world that we went to the polls last November and removed all doubt."
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
Reply With Quote