Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string inputfrac;
- stringstream temp;
- cout << "Input: ";
- cin >> inputfrac;
- //take out spaces
- cout << endl << "Before replace: " << inputfrac << endl;//omg
- for(short i = 0; i < inputfrac.length(); i++) {
- if (!isspace(inputfrac[i])) { temp << inputfrac[i]; }
- }
- cout << "After replace: " << temp.str << endl;//omg
Add Comment
Please, Sign In to add comment