First page Back Continue Last page Graphics
USING A CLASS
int main( )
{
vector<Student_info> students;
Student_info record;
string::size_type maxlen=0;
// read and store the data
while (record.read(cin))
// ...
Note the different while loop control. This calls the member function read in the instantiated object record.