Hi,
I'm looking to create a table that will map strings to strings. The format will basically be:
---------------------------------------
| Name | Description |
----------------------------------------
| name1 | some info |
| name 2 | other info |
The only way I can think of doing this at the moment is by maintaining three arrays.
char name_array[Max_entries][Max_string_length];
char info_array[Max_entries][Max_string_length];
char** ptr_array[Max_entries][2];
so that when I add a record to name_array and info_array, I pass a pointer to the record I just added into ptr_Array. e.g.
ptr_array[x][1] = &name_array[i];
ptr_array[x][2] = &info_array[j];
Will this even work, or is there an easy way of doing it?
Any help appreciated.