From the documentation the ifstream has an inherited member function from istream >> which sets the noskipws to true. Furthermore I created the ifstream object with the argument of std::ios::binary, so that's even more reason I expected it to read whitespaces. The result I get is:
std::ifstream inFile(file, std::ios::binary);
if (!inFile.is_open() || !inFile.good()) {COUT "Error opening file\n"; return false; }
inFile >> script; // Here, it is skipping whitespaces, script is an std::string
I noticed in the documentation there is another function >> operator which is std::operator >>. In this one it states that noskipws is set to false. My question is, if inFile is an ifstream object and I used >>, shouldn't the noskipws be set to true and therefore be reading the whitespaces?
How can I read the file as a binary which includes everything?