rendered paste bodyvoid CPhoneBook::display()
{
char record[40], x, ch;
int count = 0, counter;
file.seekp(8, ios::beg);
cout<<"\n";
cout<<"Records in the file are: "<<endl;
drawLine (30);
while (!file.eof())
{
cout<<file.tellg ();
count++;
file >> x;
if ( x != '*')
{
file.seekp (sizeof(int), ios::cur);
file.read (record, 35);
record[35] = '\0';
//file.getline (record, 40, '_');
cout<<count<<" "<<record<<endl;
//int len = strlen (record);
//file.seekp(39-(len+5), ios::cur);
}
else
file.seekp(39, ios::cur);
}
//file.seekp (0, ios::beg);
return;
}