- 博客(2)
- 收藏
- 关注
原创 string类的六种构造函数
// stringctortest.cpp : 定义控制台应用程序的入口点。 //测试string类的六个构造方法 #include "stdafx.h" #include #include using namespace std; int _tmain(int argc, _TCHAR* argv[]) { string one("my first string
2012-04-07 16:39:30
524
原创 c++中成员对象初始化和类继承初始化
对于继承的对象,构造函数在成员初始化列表中使用类名来调用特定的基类构造函数。对于成员对象,构造函数则使用成员名。 例如:#ifndef _H_FRABJOUS #define _H_FRABJOUS #include class Frabjous { private: char fab[20]; public: Frabjous(const char * s="C
2012-04-07 16:31:26
757
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅