Original Post
Im working on a project for my computer science class and i keep getting an error on every array i use. the error i get is: 'Board::Get_Width' : cannot convert 'this' pointer from 'const Board' to Board &'. This occurs every time i try to call a method from one of the objects in the array. If anyone could give me a hand, that would be great. Here is a snippet of the code.
class BoardPile{
private:
Board stack[50];
public:
...
void Print() const {
cout << "Length (inches)\t\tDimensions" << endl;
cout << "---------------\t\t----------" << endl;
for(int i = 0; i< 50; i++){
if(stack.Get_Length() > 0)
cout << stack.Get_Length() << "\t\t\t" << stack.Get_Width() << "x" << stack.Get_Height() << endl;
}
}
}