I saw this question online interview. Unfortunately, I canβt understand such a thing ... functions, constructor, destructors
btw, I think the structure and class are almost the same in C ++, except that class members are private by default, while structure members are public by default. Inheritance between classes is also private by default, and inheritance between structures is public by default.
And the union is different from the structure, because all the members are in one place.
thanks
source share