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();

你可能感兴趣的:(C++笔记2019-06-16)