Im not sure if i quite understand the question being asked of me... I thought i would have to input a sentence or (string) into the program and it would tell me the amount of white spaces..
Can you guys try and see if this actually will run? Im running this on Xcode so im not sure since im not too familiar with Mac and the program Xcode..
Line 11: error: no matching function for call to 'std::basic_ifstream<char, std::char_traits<char> >::basic_ifstream(std::string&)'
compilation terminated due to -Wfatal-errors.
It means that ifstream doesn't have a constructor that takes a std::string as argument. This constructor has recently been added to C++ but if your compiler does not support it you will have to pass a const char* (aka C string) instead. You can get a const char* from std::string by using the c_str() member function.