1234567891011121314
void person::person_info() { string name; string last_name; char address[256]; //cin.getline(address,256); //<-----works here! cout<<"Enter First Name: ";cin>>name; cout<<"Enter Last Name: ";cin>>last_name; cout<<"Enter Address: ";cin.getline(address,256);//<-----does not work here cout<<address; }
cin.ignore();
cin.getline(address,256);