我已经设置了以下头文件来创建使用数组的堆栈。在第7行,我得到了以下错误信息:
我认为类型应该是输入值。感谢您的帮助。谢谢。错误:ISO C++禁止声明没有类型的“Stack”。
#ifndef ARRAYSTACKER_H_INCLUDED
#define ARRAYSTACKER_H_INCLUDED
// ArrayStacker.h: header file
class ArrayStack {
int MaxSize;
int EmptyStack;
int top;
int* items;
public:
Stacker(int sizeIn);
~Stacker();
void push(int intIn);
int pop();
int peekIn();
int empty();
int full();
};
#endif // ARRAYSTACKER_H_INCLUDED