C++ Building a Tree ( fast )

HI here is what i'm suppose to do, i need your help

i need an array of pointers most probably and 3 functions.
BuildDictio(),VerifyWord and EndWord()

BuildDictio() takes  a File =  .txt or .doc ( whatever ) and Build the Tree.
In my tree, i can start with the 26 letters.
a - b - c - d - e - f - g - h - i - j ..
so my function gets the first word of the file, and add it in the tree. The way it does is, under each letter, u had the other one. If u have Joe : You start with "J", then under it u create the "O" then under "E". When the word is finish, i put a FLAG to the last letter like this i know its the end of the word.

VerifyWord(). I type in a word = cin << word..... and i check if it exist in the TREE. I see J, then i see if under "J" there is a "O", under the "O" an other "E",  and there is a flag even, == cout >> word exist, or dosent exist.

EndWord() Check if its the end of the word

Main () calls all those function and class

here is my class. Thats what i need to use

Class Dictio
{
private:
Dictio *a[26];
Bool FlagEndWord;    

public:
Dictio ( );
~ Dictio () {delete [] a;}
void BuildDictio ();
void VerifyWord ();
 void EndWord();};


can you use these fucntion to explain to me, cause i'll understand much better.

at the end i need to free the memory i use.

I dont need an heavy thing, something really simple, thats all.

i really appreciate it
thx
Ital
ItalAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
n_fortynineConnect With a Mentor Commented:
Sorry but we cannot do your homework for you. It's again the policy. Based on your explanation, this is an easy assignment though.
0
All Courses

From novice to tech pro — start learning today.