Andrea De Luca Andrea De Luca - 7 months ago 39
C++ Question

What does means * in array allocation before size declaration in C++?

table = new myObject*[TABLE_SIZE];

I know that * are for declaring pointers variable and to obtain the value of the variable from a pointer, but what does this mean?


It means exactly what you already know it means :-)

The type myObject * is a pointer to a myObject object so what you are declaring is an array of said pointers, TABLE_SIZE of them to be exact.