Struct, class and union all contain data members and methods. However, a struct and union
have their member’s public by default, while the class members are private by default. Also, a struct
cannot contain an instance of itself. A union cannot be used as a base class in inheritance. None of
a union's data members can be declared static and none of its functions can be virtual.
have their member’s public by default, while the class members are private by default. Also, a struct
cannot contain an instance of itself. A union cannot be used as a base class in inheritance. None of
a union's data members can be declared static and none of its functions can be virtual.
Comments
Post a Comment
https://gengwg.blogspot.com/