-
在C++中,内存分成5个区,他们分别是堆、栈、自由存储区、全局/静态存储区和常量存储区。
typedef的相关内容typedef详细介绍1+++typedef介绍2
栈的处理:
/*
桟作业
*/
#define SIZE 10
static int arr[SIZE];
static int top; //下一个可用位置的下标(桟中有效数据个数)
//初始化桟
void init() {
}
//清理桟
void deinit() {
}
//判断桟是否满了
int full() {
}
//判断桟是不是空的
int empty() {
}
//入栈
void push(int num) {
}
//出栈
int pop() {
}
//取栈顶数据
int top() {
}
//取有效数据个数
int size() {
}