Expected unqualified-id before '[' token

后端 未结 2 1574

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:

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-14 05:44

    modify:

    int myMaxOrders;
    int* myCashierNums;
    int* myOrderNums;
    

    add:

    ~SandwichBoard() {
        if (myMaxOrders) {
           delete [] myCashierNums;
           delete [] myOrderNums;
        }
    }
    

提交回复
热议问题