I can successful declare a dynamic one dimensional array (size is unknown at compilation) but I can't get my program to compile when I try to make it two dimensional. Here is what worked:
header.h
main.cppCode:[snip] int *myLocations;
Here is what didn't work:Code:[snip] routeData myRoute; myRoute.myLocations = new int[10];
header.h
main.cooCode:int *myLocations(*);
The 10s are just examples of what may come from what the user specified the array size to be.Code:routeData myRoute; myRoute.myLocations = new int[10][10];
Or would it be best to just use a two dimensional vector, since those don't seem to need to have size constraints on them?