C++笔记2019-06-16

    Class definitions are composed of class headers and class bodies. Class bodies are enclosed in curly brackets and end with semicolons.Class bodies include member definitions and access tags, such as "public / private". Class members are composed of operations and data, where operations are called member functions or methods.Class names, like built-in types, are custom data types that can be used to define data objects of this type.

class classname{

public:

    //公有操作集合;

private:

    //私有代码实现;

}

    To access member functions, you can use either the point operator(.) or the arrow operator of the pointer(->).

classname test; 

test.member_name();

test->member_name();

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容