trying to read all asci char's in files
Hi, I saw your encryption challenge and was a little intrigued by the option of being able to encrypt all asci files, and not just plain text, so I tried to do something similar with it myself. However, I ran into two significant problems. Firstly, what is the best way to take in the chars? I've tried this:
and:
Code:
inFile.get(letter);
but neither will get all the asci char that seem to be in .exe files and the other non-readable files. The second problem is how do I know when the program has gone through the whole file? I can't do this:
Code:
while(!inFile.eof())
{
}
because there may be a eof char in the middle of the exe. Could anyone through in a bit of wisdom?