J
JustSomeGuy
Hi. The code below works just fine as long as I enter data.
However it will not produce Null or "" strings if the user hits
enter without entering any data.
std::string pid;
std::string pname;
std::cout << "Enter Patient ID: "; std::cin >> pid;
std::cout << "Enter Patient Name: "; std::cin >> pname;
Why can't I enter a blank string?
However it will not produce Null or "" strings if the user hits
enter without entering any data.
std::string pid;
std::string pname;
std::cout << "Enter Patient ID: "; std::cin >> pid;
std::cout << "Enter Patient Name: "; std::cin >> pname;
Why can't I enter a blank string?