I am making a little program that encodes text files, but I have a small problem.
The text file has this text: test line
My program output text: testlline
(there is no encodeing going on yet)
It replaces the spaces with the char infront of it.
here is my code:
// Read Char //
cfile >> char_buffer;
// Encode Char //
int_buffer = int(char_buffer);
// Write Char
char_out = char(int_buffer);
cfile << char_out;
I am trying to leave the spaces as spaces, or even better, encode them too. Is my program skipping the spaces because of the code: cfile >> char_buffer; ?? if so, what way can I input text from a file?