How should I go about doing this?

• 04-04-2005
Asbestos
How should I go about doing this?
Well, I want to create an app that will converter normal letters, into a more complicated form. For instance, "Brick house," would become, "BE are eye sea kay aych oh you es ee." All I need to know in order to do this is just, how to begin. I do not expect you to write this for me so don't think that. I just do not know how to begin, at all. I think I might have to use, "char," or a data file but I don't know how I'll link that to the user inputted sentence, or phrase, and have them edit the file. Well any help would be appreciated.
• 04-04-2005
Quantum1024
First you'll need all of the phonetic representations stored somewhere. You could just create an array of char pointers and initialize them or load the data from a file.
If you store the phonetic representations in the same order as the coresponding letters apear in the alphabet then whenever you encouter a letter you can use it's value to get a pointer to a phonetic representation.
Consider an array like thi
Code:

```char * Array[]={   "AY",   BE };```
and then
Code:

```if (CharValue>= 65 && <= 90)   Pointer=Array[CharValue-65]; else if (CharValue>=97 && CharValue<=122)   Pointer=Array[CharValue-97);```
• 04-04-2005
misplaced
i think the easiest way to go about it is

Code:

```; //EDIT:THIS CODE WON'T WORK - USE CODE IN LAST POST char *words[] = {"aye", "be", "sea", .....} char str[] = "brick house"; for(int i = 0; i < strlen(str); i++)         cout << (str[i] - 'A' /* - 1 ??*/) << endl;```
• 04-04-2005
Asbestos
Ah, thank you guys so very much. I'll start working on this right away, and post if I run into any major problems.