Say, i have a list of things like a struct that has a name and a size field. I want the user to add (or remove) any number of these items in a List control.
The basic way I've been doing this is with two 2d array char names[20][20], int size[20]; which has obvious problems, allocates memory for 20 items even if there's 0, and can only have 20 items.
I'm assuming it's something with linked lists - which I remember doing in a data structures class in college... many years ago.
Any pointers on a library, examples, or good tutorial on how I could go about this would be appreciated!
Thanks,
The basic way I've been doing this is with two 2d array char names[20][20], int size[20]; which has obvious problems, allocates memory for 20 items even if there's 0, and can only have 20 items.
I'm assuming it's something with linked lists - which I remember doing in a data structures class in college... many years ago.
Any pointers on a library, examples, or good tutorial on how I could go about this would be appreciated!
Thanks,