正在加载图片...
上海交通大学交大密西根 联合学院·一 ◆ ■ 81T UM-SJTU Joint Institute University of Michigan Shanghal Jiao Tong University Class Declaration A class may contains a number of data members and some methods (functions)defined to manipulate those attributes;both of them could be defined either as private or public: Default attribute is private:only accessible inside of the class;public means you can access it outside of the class class name /data members declaration public:/following functions can be accessed outside of the class /method (function)declaration ;Class Declaration Class Declaration • A class may contains a number of data members and some methods (functions) defined to manipulate those attributes; both of them could be defined either as private or public: • Default attribute is private: only accessible inside of the class; public means you can access it outside of the class class name { // data members declaration public:// following functions can be accessed outside of the class // method (function) declaration };
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有