"This works because the char is a small int. If the char is 'B' then 'B' - 'A' is 1, so this is position 1 in the array"

That just fucked my head lol, sorry but i dont quite understand. I get i can use a for loop for it to search through all the letters and replace with a symbol but i dont quite understand what your talking about.

I get i can use a for loop for it to search through all the letters and replace with a symbol but i dont quite understand what your talking about.

The code in my last post calculates a position in the replace array, though I forgot to mention that the char needs to be upper case to work. This stuff relies on the chars being adjacent in the character set.

You can use std::toupper ( need to #include <locale>) to convert to uppercase.