C++ program that will convert any given string input into its Hieroglyphic Translation... How?

Create a program that will convert any given string input into its Hieroglyphic Translation.


Example:

Type a string: The quick brown fox jumps over the lazy dog


English Hieroglyphic Translation:

Th qck brwn fx jmps vr th lzy dg

Summary:
a = 1
e = 3
i = 1
o = 4
u = 2




...Please help me with this. I'm using Bloodshed Dev-C++.
Two comments.
First, it looks like the "Hieroglyphic Translation" Th qck brwn fx jmps vr th lzy dg is simply the original text with all the vowels removed. But I'm not sure whether that is really what you meant?

Anyway, I think you need to copy the original string,one character at a time, to a new string. I'd recommend a for loop. Some characters will be copied unchanged. others will - well you have to decide on the required action, such as substitute a different character.

Say you have this:
string original = "The quick brown fox jumps over the lazy dog";
then each letter can be accessed like this, original[4] would give the letter 'q' and so on.

My second comment. Check which version of Dev C++ you are using. There is an obsolete version out there, which should not be used. The up-to-date one is the Orwell version. The current version is 5.4.2 - 25 May 2013.
http://orwelldevcpp.blogspot.co.uk/
Topic archived. No new replies allowed.