please tell me:
How can I define a pointer to an array of MyType,
how to define an array of Pointer to MyType,
how to define a pointer to an array of pointer to MyType
and how to allocate memory for all this?
//pointer to array of MyType
MyType *(MyVars[])
MyVar = ((MyType *)[]) new MyType[10];
//array of pointer to MyType
MyVar (*MyType)[10];
//pointer to an array of pointer to MyType
MyType *((*MyType)[]);
MyVar= (((MyType*)[])*) new (MyType*)[10];
Is anything of this correct? What is wrong?
Greetings Andreas
How can I define a pointer to an array of MyType,
how to define an array of Pointer to MyType,
how to define a pointer to an array of pointer to MyType
and how to allocate memory for all this?
//pointer to array of MyType
MyType *(MyVars[])
MyVar = ((MyType *)[]) new MyType[10];
//array of pointer to MyType
MyVar (*MyType)[10];
//pointer to an array of pointer to MyType
MyType *((*MyType)[]);
MyVar= (((MyType*)[])*) new (MyType*)[10];
Is anything of this correct? What is wrong?
Greetings Andreas