I wanted to use fstream to read a txt file.
fstream
I am using inFile >> characterToConvert, but the problem is that this omits any spaces an
inFile >> characterToConvert
As Charles Bailey correctly pointed out, you don't need fstream's services just to read bytes. So forget this iostream silliness, use fopen/fread and be done with it. C stdio is part of C++, you know ;)