December 10th, 2012, 01:28 PM
I have something to ask you . I am stucked in a serius project of C programming. i have to do the following :
You will need two data structures for the program:
- A cross-list which stores the words of the dictionary.
In a node that stores a word list
- A cross-list that stores categories (equivalence classes) words.
In a node of this list is stored:
- The representative of the class
- The number of words that belong in this category.
- A dynamic array of indicators tied to the words of this class (as
stored in list-dictionary.
December 10th, 2012, 01:46 PM
If you are going to need to search the list of words quickly, I'd declare a hash map structure to store the list of words and the data that is associated with each word. And within the data structure, I'd use a dynamic array structure for the array of indicators and the category list.
You could use a library such as Apache's APR library, that already has a lot of this code (hashes, dynamic arrays etc.) implemented for you and it is cross-platform as well. See http://apr.apache.org/ for details.
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
December 10th, 2012, 02:01 PM
hmmm i am actually writing C in Opensuse linux. can you give me an example of code? i want to see some code in order to understand, if you can of course.