In short : No.
How to handle this truly depends on how the string was created in the first place.
Is this some user providing some simple input on stdin and you catch it with std::cin
?
If it's really a simple expression (no parenthesis etc.), you could read from stdin an int, a char, an int, a char, an int etc... and just parse the char as the operator.
I've come accross the Shunting-Yard Algorithm when I had similar a issue and it seemed to be quite what I wanted.
You could also implement some grammar. It's really rewarding when it works but this is a lot of work and overkill. See parsing math expression in c++. You'll have way better comments than mine there with code examples.