Link to home
Start Free TrialLog in
Avatar of BabyFace
BabyFace

asked on

User Defined Array Size

int * aPointer;
aPointer = new int[10][10];

Why won't it let me assign a multi-dimensional array?
ASKER CERTIFIED SOLUTION
Avatar of wpinto
wpinto

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ozo
line 3: error(3611): a value of type "int (*)[10]" cannot be
          assigned to an entity of type "int *"
  aPointer = new int[10][10];
           ^
//try
int (*aPointer)[10];
Avatar of BabyFace
BabyFace

ASKER

Good job.

Thanks.