- Class descriptions look much like structure declarations with the addition of member functions and the public and private visibility labels.
- In fact, C+ extends to structures the same features classes have.
- The only difference is that the default access type for a structure is public, whereas the default type for a class is private.
- C++ programmers commonly use classes to implement class descriptions while restricting structures to representing pure data objects (ofen called plain-old data structures, or POD structures).
Classes and Structures
最新推荐文章于 2024-08-21 10:32:14 发布