N
nodrogbrown
hi
i want to create an array of strings .I know the number of items that
the array will contain but the size of each string will be different
and will not be known at compile time.
eg: in
char * mynames[]
mynames[0]="mathew"
mynames[1]="gordon_brown"
mynames[2]="F:\gordon\docs\mycv.txt"
how can i allocate the memory for this array? I know malloc() and
free() need to be used but not sure since i am only a beginner
thanx in adv
gordon
i want to create an array of strings .I know the number of items that
the array will contain but the size of each string will be different
and will not be known at compile time.
eg: in
char * mynames[]
mynames[0]="mathew"
mynames[1]="gordon_brown"
mynames[2]="F:\gordon\docs\mycv.txt"
how can i allocate the memory for this array? I know malloc() and
free() need to be used but not sure since i am only a beginner
thanx in adv
gordon