S*****H 发帖数: 90 | 1 Is a structure just a class without any member functions?
Thanks a lot, |
g*****g 发帖数: 34805 | 2 struct is a class with everything public.
It can have member function.
【在 S*****H 的大作中提到】 : Is a structure just a class without any member functions? : Thanks a lot,
|
s*******e 发帖数: 28 | 3 should be: struct is a class with everything public by default.
It can also have private mems.
【在 g*****g 的大作中提到】 : struct is a class with everything public. : It can have member function.
|
G*****m 发帖数: 5395 | 4 default permission, public vs private
Is a structure just a class without any member functions?
Thanks a lot,
【在 S*****H 的大作中提到】 : Is a structure just a class without any member functions? : Thanks a lot,
|
k**m 发帖数: 222 | 5 another thing:
if inherited,
class is private inherited by default.
struct is public inherited by default. |