string NoSpaces(string s) { while(s.find(" ") != string::npos) { s.replace(s.find(" "), 1, ""); } return s; }