Use a map<char,char> to store the cypher read from the file. Open the clear text file and loop char-by-char outputting what you've read into the map for that given character.