在编写c++栈的过程中
typedef struct node{
int age;
string name;
struct node * next;
}student;
typedef struct node2{
int size;
student * Top;
}stack;
stack * InitStack(){
stack * mystack = new stack;
mystack->size=0;
mystack->Top=NULL;
return mystack;
}
stack * InitStack(){ 报错 stack 引用错误 ambiguous
但是mystack除了可以用stack * 定义,不知道还可以用什么类型来定义