Update maohao.cpp

This commit is contained in:
hehe 2021-05-16 15:11:37 +08:00 committed by GitHub
parent ffa2f33886
commit 7d7937ec84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ public:
static int count; // 类A的count (A::count)
};
// 静态变量必须在此处定义
// 静态变量必须在类外定义
int A::count;
int main() {
::count=1; // 设置全局的count为1