i want to terminate the input at '=' character for example that i have given 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
2 Answers
You might want to look into the scanf function as a starting point.
2 Comments
Thomas Matthews
scanf is evil. The recommendation by experts is to read the data into a string then use sscanf (that is the string version). For C++, I suggest std::getline and std::string.
FrustratedWithFormsDesigner
Yes, though I thought scanf would the simplest place for him to start.