S
Slain
I have more of a conceptual question now. Let us say I do this:-
char *str[10]; --> create an array of pointers
str[1]= "John";
I thought this would automatically put John at some memory space and
point str[1] to it.
My colleague argues that in flat bed memory this should not be done. A
new should be used to allocate the memory and then point to it. Of
course he didnt do the best job explaining, hence my question to you
guys, if you can shed some more light on this.
Thanks in anticipation
char *str[10]; --> create an array of pointers
str[1]= "John";
I thought this would automatically put John at some memory space and
point str[1] to it.
My colleague argues that in flat bed memory this should not be done. A
new should be used to allocate the memory and then point to it. Of
course he didnt do the best job explaining, hence my question to you
guys, if you can shed some more light on this.
Thanks in anticipation