>>//compiler error: a[1][0] undeclared identifier
Another reason for that error that no one has mentioned is that the class is attempting to use that array before it has been declared. If the class is in a header file then you will also have to put the array declaration there. The easiest way to do that is to make the array a static member of class Y. If you don't want to do that then you will have to do something like this:
class X
{
// blabla
};
extern X* a[10][10];
class Y : public X
{
public:
func()
{
a[1][0] = reinterpret_cast<X*>(this);
}
};
X* a[10][10];
int main()
{
}