dimanche 1 mars 2015

Why is "$$" the only thing read into my input?


I am trying to have my program read input and whenever "$$" is read the program will terminate and not include $$ however when the program terminates the input is only $$. Previously I was using just cin but I heard that getline will allow me to receive multiple input however this doesn't seem to be the case.



while (input != "$$") {
cout << "Enter input: ";
getline(cin,input);
}

cout << input;




Aucun commentaire:

Enregistrer un commentaire