View Single Post
Join Date: Aug 2007
Posts: 1,678
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: 193
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?
Everyone's gotta believe in something. I believe I'll have another drink.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
Reply With Quote