I just started the program but when I run it, it jumps from name to address without allowing the name to be entered. Can anyone tell me why? Thanks for the help.
int menu_1;
cout << "Name:";
getline(cin, name);
cout << "Address:";
getline(cin, address);
cout << "City, State ZIP:";
getline(cin, city_state_ZIP);
cout << "\n\n1. Main Menu\n";
cout << "2. Create another entry\n";
cout << "Please enter your selection:>";
cin >> menu_1;
cout << "\n\n";
This returns the following error in Visual c++.
array out.cpp(45) : error C2784: 'std::basic_istream<_Elem,_Traits> &std::getline(std::basic_istream<_Elem,_Traits> &,std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'std::basic_string<_Elem,_Traits,_Alloc> &' from 'char'
1> c:\program files\microsoft visual studio 9.0\vc\include\string(527) : see declaration of 'std::getline'
Thanks. Got it all worked out. Everything is working. Sorry for asking simple things. This is my first program in c++. I am reading as much as a can. THe only other programming I know is assembly so its all new to me. Thanks again