>Anthony.Location=(Space**)A ;
If you have to use a cast, you're probably doing something suspicious. By the way, Space** isn't the same as a two dimensional array of Space. If you really wanted to do it this way, you could do this:
But I wouldn't recommend it for anything but a toy that prints a nifty figure.Code:#include <iostream> #include <string> using namespace std; class Space { public: int Description; }; class Player { public: Space (*Location)[10]; }; int main() { Space A[10][10]; Player Anthony; Anthony.Location = A; for ( int i = 0; i < 10; i++ ) { for ( int j = 0; j < 10; j++ ) Anthony.Location[i][j].Description = i + j; } for ( int i = 0; i < 10; i++ ) { for ( int j = 0; j < 10; j++ ) cout<< Anthony.Location[i][j].Description <<' '; cout<<endl; } }