#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define OK 1
#define ERROR 0
#define TRUE 1
#define FALSE 0
#define MAXSIZE 20 /* 存储空间初始分配量 */
typedef int Status;
/* QElemType类型根据实际情况而定,这里假设为int */
typedef int QElemType;
/* 循环队列的顺序存储结构 */
typedef struct
{
QElemT...
#include<iostream>
#include<stdlib.h>
#include<malloc.h>
#define STACK_INIT_SIZE 100
#define STACKINCREMENT 10
using namespace std;
struct sqstack
{
int *base;
int *top;
int stacksize;
};
int Initstack(sqstack &s)
{
s.base = (int*)malloc(STACK_INIT_SIZE*sizeof(int));...