I'm taking a command and I want to store it as a vector of characters.
int main()
{
vector<char> command;
cout << "Reservations>>";
char next;
cin >> next;
while (next !='\n'){
command.push_back(next);
cin >> next;
}
for(int i=0; i< command.size(); i++)
cout << command[i];
}
But the while(next !='\n') is not working, as it keeps letting me type even though I've hit enter.