Results 1 to 3 of 3

Thread: Read text file using VC++6

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2001
    Posts
    485

    Resolved Read text file using VC++6 [UNRESOLVED]

    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
    Last edited by Harddisk; Oct 10th, 2005 at 10:17 PM.

  2. #2
    Member
    Join Date
    Mar 2001
    Posts
    60

    Reply

    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
    What is Life? One big dream or one Big nightmere.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2001
    Posts
    485
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width