摘要:
#include <iostream> using namespace std; #include <string> class Person { public: Person(int age) { //1、当形参和成员变量同名时,可用this指针来区分 this->age = age; } Per 阅读全文
posted @ 2021-11-15 22:11
keep码
阅读(30)
评论(0)
推荐(0)
摘要:
静态成员变量 #include <iostream> using namespace std; #include <string> class Person { public: static int m_A;//静态成员变量 //静态成员变量特点: //1 在编译阶段分配内存 //2 类内声明,类外 阅读全文
posted @ 2021-11-15 11:58
keep码
阅读(35)
评论(0)
推荐(0)
浙公网安备 33010602011771号