AIBase* allai[2];
AIBase *z0AI = new AIA;
AIBase *z1AI = new AIB;
allai[0] = z0AI;//this this gives me an error
allai[1]= z1AI;
AIBase is the superclass and AIA and AIB inherits from the AIBase what is wrong with the syntax ,i need some help in figuring this out error 1:
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int error C2466: cannot allocate an array of constant size 0 error C2040: 'allai' : 'int []' differs in levels of indirection from 'AIBase *[2]'
Why must this code be in function scope? Cant this work in global scope?