First of all choose a language, because C++ and C# are bot the same.
Quote:How do I parse a math equation using string manipulation?
Both languages are documented a little Google will give you plenty of links to documentation and tutorials. You will learn much more this way and you will find it very useful in future.
If your formulas are not more complex, simply detecting spaces and splitting to 3 strings is enough, in second string you will get the operator.
If formulas can be more complex (2 + 3 * 4 and more), you will need a parser
and take into account priority of operators
By the way, your snipset of code is not C++ neither c#