Why is this not reading from the file
The contents of the file
123456 James.Watson 234567 12.Clover.Crescent Spanish.Town St.Catherine Single Standard Passprot
ifstream file;
file.open( "guest.txt", ios::in );
if ( !file )
{
cerr << "File could not be opened" << endl;
exit( 1 );
}
guest info1;
while(file >> idnumber >> contact >> name >> street >> parish >> country >> category >> booking >> idtype )
{
info1.setinfo(idnumber,contact,name,street,parish,country,category,booking,idtype);
info1.display();
}