hi all
I'm trying to read a document char by char
my question is how do I read the spaces as well?
Thank you!

This code with print all the characters from any file to the console.

using namespace std;

const char fileName[] = "FILENAME";

int main() {
	ifstream in(fileName, ios::in | ios::binary);
	while (in) {
		cout << (char) in.get();
	return 0;

thx william!

is there a way to make 'in' binary after I've reached certain char? I just want to read the file char by char (including spaces) after certain point in the file.

post code. If its reading character by character then it will pick up spaces too.

char c;
while( infile.get(c) )