Getting an access violation error when I get to the array sort code...
Here's the code. Any thoughts?
// sort the shape arrays by area
for(int i = 0; i < total - 1; i++)
{
for (int j = i; j < total; j++) //start at i
{
if (shapeArray[j + 1]->area() < shapeArray[j]->area()) // sort order
{
tempArray[j] = shapeArray[j]; // swap elements
shapeArray[j] = shapeArray[j + 1];
shapeArray[j + 1] = tempArray[j];
}
}
}