Well, if you are reading/encoding the entire file, just read the entire file, then just write the encrypted file as you read the old one.
So I do something like:
if ch='a'
{
}
correct?
But then how do I place my variable a inreplace of the character 'a'?
EDIT: actually I have a switch for every letter already but I am still very confused
EDIT EDIT: While I'm at it I might as well mention the other errors I have as well:
infile.open( argv[1].c_str() ); //open book file -- error C2228: left of '.c_str' must have class/struct/union
while ( tolower(infile.get(ch) ) ) - fatal error C1903: unable to recover from previous error(s); stopping compilation -- error C2664: 'tolower' ***FIXED
Couple other errors as well but I'll leave it at this for now
Thanks
Last edited on
nvm I fixed the replace... but for some reason my program says it finds the letter 'a' more than once.
My file that I am encoding is just abcdefghijklmnopqrstuvwxyz. So there is only one 'a' in the file.
Any suggestions?
Thanks
EDIT: the replace is not fixed... :(
Last edited on
can anyone help me please I have to have this assignment done by thursday :(