How to init an array dynamically on the heap in C ( in C++ its easy). To init an array on the stack, I write:
int size = 1000;
How to do the same on the heap?
int* heaparray = (int*) malloc (size);
But: my heaparray pointer doesnot know its a pointer to an array. And I want him to know that, because my Borland VCC6 Debugger should show me the array fields. Is there a way to do that with simple typecasting like
which doesnot work.