My code only picks up single words. Not words with spaces. Can anyone help? #include <iostream> #include <map> #include <iterator> #include <algorithm> #include <string> #include <fstream> #include <sstream> using namespace std; string isLower(string s) { string data = s; std::transform(data.begin(), data.end(), data.begin(),::tolower); return data; } string trim(string str) { stringstream trimmer; trimmer << str; str.clear(); trimmer >>str; return str; } int main() { map<string, int> item_count;...
Need Help. The program compiles and runs but not working to full capacity. I cant figure out how to make the program pick up spaces. I have "trash bag" and "trash can" in my code but it only picks up trash, and its to many frequencies for the item . #include <iostream> #include <map> #include <iterator> #include <algorithm> #include <string> #include <fstream> #include <sstream> using namespace std; string isLower(string s) { string data = s; std::transform(data.begin(), data.end(), data.begin(),::tolower);...