Andrea De Luca Andrea De Luca - 1 year ago 89
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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download