Guest User

Untitled

a guest
May 25th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. string inputfrac;
  2. stringstream temp;
  3. cout << "Input: ";
  4. cin >> inputfrac;
  5.  
  6. //take out spaces
  7. cout << endl << "Before replace: " << inputfrac << endl;//omg
  8. for(short i = 0; i < inputfrac.length(); i++) {
  9. if (!isspace(inputfrac[i])) { temp << inputfrac[i]; }
  10. }
  11. cout << "After replace: " << temp.str << endl;//omg
Add Comment
Please, Sign In to add comment