cout <<"Enter the following fields of data:"<<endl;
cout <<"Plaease enter your name:";
cin.getline(b.name,20);
cout <<"Please enter your address:";
cin.getline(b.address,50);
cout <<"Further detail of address:"<<endl;
cout<<"State :";
cin.getline(b.address2.state,20);
cout<<"City :";
cin.getline(b.address2.city,20);
cout<<"Postcode :";
cin >>b.address2.postcode;
cout <<"Phone number :";
cin >>b.phonenum;
cout <<"Balance remaining :";
cin >>b.balance;
cin.ignore();
cout <<"Date of last payment :";
cin.getline(b.date,20);
The second option of this program let me find the specific data in the customer_account.dat, but the result found nothing of the record i want even the data is existed when i entered in the first option.In contrary ,if i initialised the name with "Michael" like(string name = "Michael"),it reveal all the information of Michael correctly.Any correction of the codes ,so that i can find the record with cin the name i want ?