#include <string>
std::string input;
std::cin >> input;
The user want to type "Hello World."
However, cin fails to recognise the space between the two words.
How do I get Cin to see the entire Hello World?
I'm trying this using structs, and cin.getline doesn't appear to work.
This is my code:
struct cd
{
std::string CDTitle[50];
std::string Artist[50];
int number_of_songs[50];
};
std::cin.getline(library.number_of_songs[libNumber], 250);
This yields an error. Any ideas?