Stupid Calculator Program

Okay, so I'm trying to make a program here that performs completely unhelpful variants of normal math functions, for example:
2 + 3 = 23
2 - 3 = 32
2 * 3 = 222

The trick is that I have to figure out which function is being called for without specifically asking the user whether they want to do stupid addition, stupid subtraction, or whatever.
How do I detect which math operator is inputted into the program?
if you using the string class, i think there is a member function you can use to find a character.
I'd say
1
2
3
4
5
6
7
char ch;
cin >> first_number;

do ch = cin.get();
while(ch != '*' && ch != '+' && ch != '-');

cin >> second_number;
Topic archived. No new replies allowed.