terminating the input at '=' character
i want to terminate the input at '=' character for example that i have gi开发者_运维问答ven the input 2 +3= as soon as i give the '=' character it should process the input and display the output. Any help.. Spaces can also be included in the input. (it should not take any input after '=' character) the pl is c++ or c
The obvious approach would be something like std::getline(intput, your_string, '=');
You might want to look into the scanf function as a starting point.
精彩评论