完整代码:
#include<iostream>
#include<stdio.h>
#include<malloc.h>
#include<stdlib.h>
#define MAXSIZE 1000
using
namespace
std;
typedef
struct
{
int
data[MAXSIZE];
int
top;
}SqStack;
void
InitStack(SqStack*&s){
s=(SqStack*)
malloc
(
sizeof
(SqStack));