|
|
getline (cin >> ws, cmd) ;
.cin >> tasm;
line leaves a newline in the input buffer, and getline sees that and eats it instead of waiting for more input.cin >> ws
gets rid of leading whitespace first so that getline won't think that it's already reached the end of the line.