64,631
社区成员
发帖
与我相关
我的任务
分享
major_book tree;
LIB<Data> handler(tree);
handler->kind();
//这样写能通过没有问题
LIB<Data> handler(major_book());
handler->kind();
//这样写就报错
: error C2227: left of '->kind' must point to class/struct/union/generic type
LIB<Data> handler(major_book());
handler->kind();
LIB<Data> handler((major_book()));
handler->kind();
major_book tree;
LIB<Data> handler(tree);
handler->kind();
//这样写能通过没有问题
LIB<Data> handler(major_book());//看一下这一句的反汇编,我感觉是不是编译器理解为函数声明了!根本就没有构造handler这个对象
handler->kind();
//这样写就报错
: error C2227: left of '->kind' must point to class/struct/union/generic type