A little stuck.. is this possible?
I'm a little stuck on this, I need to declare an array of char pointers, but I want to do this in initialization, is this possible?
I tried char* array[size]; But the program just crashes when I try to set an element to a string(char array), although syntactically it is correct. I'm guessing it is just another way of saying char* array = new char[size]? I'm not sure but is there anyway I can do this without going through for loops and such.
Also, just as a remimder, you only need to delete a pointer when you allocate memory to it with new, correct? As with malloc() and free()?