• 2024-11-15命令模式实现撤销和重做机制
    #include<vector>#include<iostream>//定义命令接口classCommand{public: virtualvoidexecute()=0; virtualvoidundo()=0;};//实现“增加”命令类classIncreaseCommand:publicCommand{private: int*_value; int_amount;public: IncreaseCom