OOP Basicwhat's the diff between struct & class?

Q:
    if struct can have the construtor/desctructor and memeber functions ? if so, what's the diff between struct& class?

A:
    Yes! and the diff is that: in Class ,the default variables access type is priavate, while public in struct. struct can also have constructor/destructor and can be inherited from base class also,etc.
原文地址:https://www.cnblogs.com/Winston/p/1081738.html