I would like to write a program just for fun. (Inspired by the movie, The Imitation Game)
The program will input a txt file, lets say it holds the word "game" in it.
Then when it inputs it, it will then change each letter to a new letter, then it will output it. So inputs "game" and then outputs "jusa" (jibberish, basically) I know fstream and stuff. My only problem is the conversion of inputted text, "game".
I don't want you guys to write the program for me, just some help on what to use to create a "key" to encrypt and decrypt messages with
no, you would use 'letters' as a pointer or iterator to iterate trough alphabet up and back depending on user supplied key.
for example
1 2 3 4 5 6 7
vector<char> alphabet = { /* input alphabet here */ }
string plaintext = "some text"
// replace each character 8 places away:
for(short i = 0; i < plaintext.size(); ++i)
plaintext.at(i) = alphabet.at(i + 8);
you will also need to ensure not to iterate to far away, ie. by checking the iterator or something and if it's not valid to return it back to the beggining of alphabet and until char from 8 places away is obtained.