9.21学习总结

今日安排

学习两栈共享

const int
Stack_Size=100;

template<class T>

class BothStack


{

  public:

       BothStack( );

       ~BothStack( );

       void Push(int i, T x);

       T Pop(int i);

       T GetTop(int i);

       bool Empty(int i);

  private:

       T data[Stack_Size];

       int top1, top2;

};

 

posted @ 2021-09-21 21:14  今天又双叒叕在敲代码  阅读(10)  评论(0编辑  收藏  举报