I know this error is generally for syntax errors, but I can\'t seem to find anything wrong with this code. Can anyone help me point it out? Here are the errors I\'m getting:
This is C++, not Java! Declare arrays like this:
int myCashierNums[1000];
int myOrderNums[1000];
Please note that the arrays in C++ must have a size at compile time. In the above example, it is 1000.
modify:
int myMaxOrders;
int* myCashierNums;
int* myOrderNums;
add:
~SandwichBoard() {
if (myMaxOrders) {
delete [] myCashierNums;
delete [] myOrderNums;
}
}