Retrieving info from a file...
Hi, I'm making an encryption program, not a very serious one really, but still I'm doing one. I'm having a problem though. I ask the user to input a string, and depending on what they want to call the file it is to be saved to, the length of the string it will encrypt it like:
for (int w=0; w<len; w++)
int BIT = sign*(w*(t*(42)));
fprintf(fp, "%c", MESSAGE[w]+BIT);
something like that anyways. BIT is by what the characters deviate. Anyways, sometimes it puts a new line character in the encrypted codeword and when I try do decode it, it works up till that point. here's how I decode it:
this isn't exactly it, I can't find it on file, but if the file it creates, the one fp points to, has a new line in it, it won't let me decode the rest of it ...
for (int doubleu=0; doubleu<LEN; doubleu++)
fscanf(FP, "%c", message[doubleu]+bit;