> How about
> MyClass ** ppMyClass;
> ppMyClass=m_MyClass; or the same
No, the above line is invalid.
> ppMyClass=&m_MyClass[0][0];
and this line is also invalid.
> or dynamically
> MyClass ** ppMyClass=new MyClass *[4]
> for (int i=0;i<8;++i){
> ppMyClass[i]=new MyClass [8]
> }
Ah, but that's not the same, is it? You have created an array of pointers,
not a two-dimensional array, which is what the OP wants.
Brian
Boni - 05 May 2005 17:55 GMT
> No, the above line is invalid.
> and this line is also invalid.
Hi Brian,
thanks to pointing that out. I am sorry for that advice.
> Ah, but that's not the same, is it? You have created an array of pointers,
> not a two-dimensional array, which is what the OP wants.
I think you are wrong on that. There is physically no such thing as a 2
dimentional array in the memory. It is array of pointers to pointers. The
first operator[] take the pointer to the array of values the second
operator[] takes the value.
With best regards,
Boni
Brian Muth - 05 May 2005 22:27 GMT
And thank YOU for refreshing by C skills!
Brian