I have something like this:
How can i access the As[0] data structure elementsCode:#include <iostream> #include <cstdlib> #include <ctime> using namespace std; struct boy { int age; string name; }; void main() { typedef boy* botPtr; botPtr * As[6000]; for( int i = 0 ; i < 6000 ; i++) As[i] = new botPtr; botPtr * Ps = new botPtr[2000]; Ps[0]->age; As[0]->age //produces an error }




Reply With Quote