OOP Basic--what'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.

posted on 2008-02-26 10:27  飞天舞者  阅读(241)  评论(0编辑  收藏  举报

导航

For more information about me, feel free email to me winston.he@hotmail.com