class Node;
class Stack
{
Stack(Node* next){
....
}
void func(void){
Node* test = NULL;
}
class Node
{
.....
}
}
如上示例代码,先声明一下class Node;现在这种为什么不能编译通过,Stack构造时会
报错,但是func()里面使用Node类型却不报错。我的问题:为什么参数类型是Node
会报错,但是函数里面使用确不会报错;