PDA

Click to See Complete Forum and Search --> : Read text file using VC++6


Harddisk
Aug 5th, 2001, 10:30 AM
Hi,

I m still new in this Visual C++ 6. Learning from some notes I downloaded off the web. I came across this assignment, where requires me to read a text file, with certain structure in it.

Somehow my program skipped the 1st record (Jones, Frank). Here I attach the codes and the text file.

Problem occurs in ReadStudents function.

Thanks.

Harddisk

TeamKiller
Aug 5th, 2001, 11:51 AM
one little error
in database.cpp goto

void DisplayStudents(const tvector<Student> &Students)
{
for (int i = 1; i < Students.size(); i++)
{
cout << Students[i];
cout << "Press a key to continue." << endl;
getch();
}
}


and change "i = 1" to "i = 0" then it works :)

Harddisk
Aug 5th, 2001, 01:01 PM
Thanks a lot!

It works perfectly. :))

Still got a lot to go..... <sigh>
Me too pampered with VB and C++ is kinda giving me some hard time.....hehe

Harddisk