华清远见第六课程作业day3

类 栈


#include 

using namespace std;

class Sta{
private:
    int *data;
    int top;
public:
    Sta():data(new int(128)){
        top=-1;
        cout<<"stack::无参构造:"<

类 队列

#include 

using namespace std;

class Sta{
private:
    int *data;
    int head;
    int tail;
public:
    Sta():data(new int(10)){
        head=0;
        tail=1;
        cout<<"stack::无参构造:"<

你可能感兴趣的:(c++,开发语言)