class xxx
{
public:
void buscar();
void imprimir_todos();
void ajustar_nvo_saldos();
};
void xxx::buscar()
{
ifstream clientes("d:\customer.dat", ios::in);
if(!clientes)
{
cout<< "el archivo no pudo abrirse ..";
exit(1);
}
int telefono;
int find;
char nombre[50];
double saldo;
cout<<"ingrese numero de telefono a buscar"<<"\n";
cin>>find;
cout << setiosflags(ios::left)<< setw(13) << "telefono" << setw(13)<< "nombre"<< "saldo\n";
while(clientes >> telefono >> nombre >> saldo)
{
if(telefono ==find) //muestra el registro unicamente donde saldo=find
salida(telefono,nombre,saldo);
}
getch();
}