If anybody could help me I would appreciate it.
I am trying to decode using the following:
Decode string: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Infile string: CDMLEFB LIR AFMBLDEBK DJR ZMWW FZ IEWWK
Infile string should decode to: CAUTION THE MOUNTAINS ARE FULL OF HILLS
What I have been trying to do is find the position of the incoming letters from the file. My problem is that I only get the first letter of the infile (C being at position 2, which equals to C, the next one should be D at position 0, which equals to A, etc). If I add an index to "final", it gives me a compiler error. Maybe I'm going at it the wrong way? Please help!
char string3 = "DOCTRZSIENVWABFGHJKLMPQUXY";
infile.open ("F1949.txt", ios::in);
cout << final[i];
pdest = strstr( string3, final );
result = pdest - string3;
if( pdest != NULL )
cout << endl << final[i] << " found at position " << result << endl;