Delimiting a string

Hey
I'm new to c++, and I would like to what is the most simple way to delimit an input from the user?
fx, user types in
"20m".
and the program saves the "20" in an int and the "m" in a char, but how would you do that?
if you do cin << with a numeric variable (int, float, etc.) it will stop after the last number.
so
1
2
3
int i;
char c;
cin >> i >> c;
should be fine.
Topic archived. No new replies allowed.