At first you must load map contents (where is the code? ). But you have another problem: std::map<char*,int> can't help you because its key_type is char* but operator< for char* type compares pointer values, not referred C-strings. Therefore you will get wrong dictionary...
It's possible to define a simple wrapper class for char* type with its own operator< but it seems you can't do it now. So consider map<string,int> type for your dictionary: it's less effective but a very simple solution.
Now get F1 help on map insertion (or google it) then send us the next version of the program product...
Last edited by ArkM; Nov 3rd, 2008 at 3:47 pm.
Reputation Points: 1234
Solved Threads: 347
Postaholic
Offline 2,001 posts
since Jul 2008