I have written the program with the following code, and it changes ASCII to letters but what I want it to do is convert the ASCII to ABC and vice versa by words, not individual letters, but I don't know how to do it. I understand that converting ASCII words to ABC might be a problem as the numbers are all messed up, some two digits and three, so I want to have a '|' placed between each number. I also want the ABC to ASCII function be able to accept the input in this way. Any ideas? Help much appreciated

To accomplish this I would suggest making a specialized function for converting ascii to '|' separated decimal, and a second function to reverse it. Then in the main function determine if it is encoded or not (by checking if the input consists of more that just numbers, spaces, and '|'), and based on that split by space characters and run the needed function on each word. Then you can concatenate the output words, separating them by spaces, and magic, it works. I hope this explains what you need to do to accomplish what you are trying to.

I had to read this a second time to make sure I got it. I was having a little trouble reading your code. What you're trying to accomplish is going to require using more than just a character for input. Try the std::string or std::stringstream object.