I need to create a "Table" (2D array) whose instance are lookup tables of directories. Each table entry will consist of two strings of NO fixed length: a key, which is what we are looking up, and a value, which is what we are trying to find. For example, if our table represents a telephone directory that lists names and numbers only, the key will be names and the values will be the corresponding telephone numbers.
A table row consists of TWO POINTERS. One to DYNAMICALLY ALLOCATED key array and one to (corresponding) dynamically allocated value array. The two arrays are dynamically allocated so that they can be only as long as required - NO fixed size. The size of the table is NOT fixed either. Initially, the table largeenough for only up to 2 entries will be dynamically allocated.
How do you define this. We are basically looking for a 2D dynamically allocated array of char pointers (array of chars). What is the definition...
Thanks
A table row consists of TWO POINTERS. One to DYNAMICALLY ALLOCATED key array and one to (corresponding) dynamically allocated value array. The two arrays are dynamically allocated so that they can be only as long as required - NO fixed size. The size of the table is NOT fixed either. Initially, the table largeenough for only up to 2 entries will be dynamically allocated.
How do you define this. We are basically looking for a 2D dynamically allocated array of char pointers (array of chars). What is the definition...
Thanks