I'll make you a deal... you translate and repost your request for help into pig latin.. and I'll throw some quality c++ code your way.
Clinton Portis
Practically a Posting Shark
833 posts since Oct 2005
Reputation Points: 237
Solved Threads: 118
If you need help, you need to explain what you need help with. All you've said is "Here's what I need to do, Here's my code." No mention of what the trouble is.
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
I'm still not giving out code until you post in pig latin. In fact, I propose that for the rest of this thread, everyone post in pig latin.
Clinton Portis
Practically a Posting Shark
833 posts since Oct 2005
Reputation Points: 237
Solved Threads: 118
Who made your rules? I ask because they are not the standard translation rules.
1) All consonants at the beginning of the word are moved to the end and AY is added.
2) If the word begins with a vowel, WAY is added with no other changes.
3) There is no rule about the end of the word ending in the AY sound. This is a nearly impossible rule to test for. A computer program cannot test for a sound.
See this.
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
>A computer program cannot test for a sound.
I'm sure all of the programmers working on phonetic recognition algorithms (eg. Soundex) will be dismayed to hear that.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
I'm sure they will. Sorry guys...
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
Iway agreeway ithway altPWay aboutway oundsay etectionday ithinway hetay copesay ofway ouryay sc100cay lasscay. Inway orderway otay akemay ouryay instructorway appyhay houghtay, e'llway avehay otay roceedpay underway hetay assumptionway hattay anyway ordway endingway inway "ay" illway esultray inway anway "ay" oundsay. ithWay histay inway indmay, Iway resentpay otay e'yay hetay ollwingfay odecay:
bool is_ay(string& word)
{
int pos = word.rfind("ay");
return (pos == word.size()- 2);
}
ownay ouya ancay esttay ordsway orfay hetay "ay" oundsay, if(is_ay(word)) hentay eavelay itway aloneway.
Clinton Portis
Practically a Posting Shark
833 posts since Oct 2005
Reputation Points: 237
Solved Threads: 118
implysay odifymay ymay originalway odecay otay eetmay ouryay eedsnay:
is_ay(stirng& word)
{
int pos = 0;
string test[4] = {"ay", "ey", "ei", "ai"};
for(int i=0; i<4; i++)
{
if(word.rfind(test[i] == word.size() - 2))
{
return true;
}
}
return false;
}
Clinton Portis
Practically a Posting Shark
833 posts since Oct 2005
Reputation Points: 237
Solved Threads: 118
Then look at the last characters of each word and compare them with your list of AY sounds.
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944