for (int pos = 0; pos < NUMBEROFOBJECTS; pos++)
{
cout << "Information for box number " << pos + 1 << endl << endl;
cout << "The length of the box is " << box[pos].getLength() << endl;
cout << "The width of the box is " << box[pos].getWidth() << endl;
cout << "The area of the box is " << box[pos].findArea() << endl;
cout << "The perimeter of the box is " << box[pos].findPerimeter() << endl << endl;
}
If you slice that #include "stdafx.h" off the top and make main return an int rather than a void (in C++ main returns an int, always always always), it compiles.
What does it do that you think it shouldn't, or not do that you think it should?