文件名称:exercise2
介绍说明--下载内容均来自于网络,请自行研究使用
2. 创建一个Message类,其构造函数带有一个string类型的默认参数。创建一个string类型的私有成员,在构造函数中只是简单地把参数赋值给内部的私有成员。创建两个重载的成员函数print() ,一个不带参数,而只是显示存储在对象中私有成员的信息,另一个带有string类型参数,它将显示该参数加上对象内私有成员的信息。- Create a macro was not found, the constructor moves with a type of default parameters. Create a type of private members, moves in the constructor simply put the parameter to internal private members. Create two overloaded member function locate 14, 20: print (), Don t take a parameter, and only show stored in the object of private information, another type parameters, it moves with the parameters of the objects that will add private members within the information.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
exercise2\CMakeLists.txt
.........\Message.cpp
.........\message.h
exercise2
.........\Message.cpp
.........\message.h
exercise2