码迷,mamicode.com
首页 >  
搜索关键字:this指针当参数    ( 1个结果
C++ 成员变量是别的类的对象
?在成员函数中,可以将this指针当参数传递,也可以返回this指针,或返回通过this指针拿到的对象 /* 成员变量是别的类的对象 */ #include using namespace std; //日期类 class Date { int year,month,day; public: //构造方法 Date(){ cout << ...
分类:编程语言   时间:2015-01-23 23:08:33    阅读次数:531
1条  
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!