All pastes #50379 Raw Edit

Mine

public text v1 · immutable
#50379 ·published 2006-04-21 12:25 UTC
rendered paste body
void 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;	
}