can class inherit struct in C++? -
this question has answer here:
- in c++, can derive class struct 3 answers
i have following code in c++:
typedef struct { int a; int b; float c; } data; class datainfo : public data { // code here }; my question can class inherit struct in c++? how happens?
struct included in c++ provide complitability c. has same functionality class, members in struct public default. can inherit class struct , same in reverse.
Comments
Post a Comment