I’m really not sure what it is (if it’s an array of pointers, or an array of pointer arrays???), but when I step on it via the Debugger it gives me 0xCDCDCDCD, meaning the memory is allocated, but uninitialized. Can anyone show me how to initialize it?
Thanks.
char* (*vars)[4];
I’ve tried stuff like this, but it gives compile errors:
for (int i = 0; i < 4; i++)
vars[i] = new char*[new char*][4]; // error C2440: 'initializing' : cannot convert from 'char **' to 'unsigned int'
Firstly, you need to use cdecl:
How you initialise it depends on what your aim is. But, for instance:
Lastly, you should never write code like this in C++. There’s always a better way to do whatever it is you’re trying to do (usually involving containers and smart pointers).