C++ Building a Tree ( fast )

Posted on 2003-02-28
Medium Priority
Last Modified: 2010-04-01
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
Dictio *a[26];
Bool FlagEndWord;    

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
Question by:Ital
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

n_fortynine earned 200 total points
ID: 8054534
Sorry but we cannot do your homework for you. It's again the policy. Based on your explanation, this is an easy assignment though.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question