我在 C++ 中有以下代码:
typedef struct
{
int a;
int b;
float c;
} Data;
class DataInfo : public Data
{
// some code here
};
我的问题是类可以继承 C++ 中的结构吗?这是怎么发生的?
我在 C++ 中有以下代码:
typedef struct
{
int a;
int b;
float c;
} Data;
class DataInfo : public Data
{
// some code here
};
我的问题是类可以继承 C++ 中的结构吗?这是怎么发生的?