#include "stdafx.h"
#include<string>
#include<iostream>
using namespace std;
typedef struct Car
{
string status;
int carnumber;
int arrive;
int left;
}*car;
typedef struct SqStack
{
car base;
car top;
int stacksize;
}SqStcak;
int main()
{
SqStack Stop;
Stop.base = (car)malloc(2 * sizeof(Car));
if (!Stop.base)
{
cout << "创建失败" << endl;
return 0;
}
Stop.top = Stop.base;
Stop.stacksize = 2;
Car a;
*(Stop.top) = a;
return 0;
}
#include<string>
#include<iostream>
using namespace std;
typedef struct Car
{
string status;
int carnumber;
int arrive;
int left;
}*car;
typedef struct SqStack
{
car base;
car top;
int stacksize;
}SqStcak;
int main()
{
SqStack Stop;
Stop.base = (car)malloc(2 * sizeof(Car));
if (!Stop.base)
{
cout << "创建失败" << endl;
return 0;
}
Stop.top = Stop.base;
Stop.stacksize = 2;
Car a;
*(Stop.top) = a;
return 0;
}