i'm having a lot of problems with this program. hopefully someone can help me out.
the program prompts the user for an equation such as 123 + 123 = what i'm supposed to do is break up the string into four substrings and display each string on its own line. i know how to display the substrings, but my problems is with breaking up the string into the substrings.
this is the code i have so far for trying to separate the string:
if (cin.peek == " "
cin.ignore();
else
cin >> first;
i know it's wrong but i don't know how to fix it. any help will be greatly appreciated.
the program prompts the user for an equation such as 123 + 123 = what i'm supposed to do is break up the string into four substrings and display each string on its own line. i know how to display the substrings, but my problems is with breaking up the string into the substrings.
this is the code i have so far for trying to separate the string:
if (cin.peek == " "
cin.ignore();
else
cin >> first;
i know it's wrong but i don't know how to fix it. any help will be greatly appreciated.