Hello,
I need help to read entire string line with white spaces.
I tried many ways but they didn't work :|
If I remove cin>> company_name;
the run jumps to std::cout << "Enter the symbol of the company: ";
without completing reading company_name from the user!
AND,
If I keep cin>> company_name;
the getline skips the first part from the string.
Thanks in advance for your hep :)
std::cout << "Enter the name of the company: ";
cin>> company_name;
//cin.clear();
std::getline (cin,company_name, '\n');
std::cout << "Enter the symbol of the company: ";
std::cin >> company_symbol;