9.21学习总结

(1)今日安排

学习两栈共享

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;

};

 

上一篇:C++ 学习之vector数组的容量和大小


下一篇:isset 与 empty 区别 (二)