a simple decrypting progarm,,

,,hey guy's i need ur help,,
i have a project about a simple substitution program like this,,
i have to substitute the all the vowels with a corresponding character

a ==> !
b ==> @
c ==> #
d ==> $
e ==> %

Enter a word: generation
Decrypted word: g%n%r!tion


thanks for help in advance,,
You can parse each single character and modify its value if you find a vowel
What use is string::substr for this task?

1
2
3
4
5
6
7
for (int i = 0; i < str.length(); ++i) {
    switch (str[i]) {
        case 'a':
        case 'A': str[i] = '!'; break;
        // etc.
    }
}
,,thanks for ur reply guys,,
how can i parse it,?
,,chewbob,, can you post the whole code,?
Chewbob posted everything you need to understand how to do that...
Topic archived. No new replies allowed.