Anyone can teach how to search a data in a text file?
string line;
string id;
fstream file;
file.open("administrator.txt");
cin.ignore();
cout<<"Enter ID number: ";
getline(cin, id);
if(file.is_open())
{
while ( file.good() )
{
what should i put for my statement?
}
}
file.close();
system("PAUSE");
}