view公司代码发现的写法,编译应该是没问题的,我实测类似写法在vs2019报错!。
class Student_parent
{
public:
int aa;
private:
int nnum;
};
class Student:public Student_parent
{
public:
int a;
private:
int num;
};
struct data
{
int b;
};
class xiaoming
{
public:
Student<data> cccckkkk;
};
Student<data> cccckkkk;,Student是类,data是结构体,这种声明成员cccckkkk的方式到底啥意思?