This commit is contained in:
杨洋 2022-02-27 12:48:22 +09:00 committed by GitHub
commit 82b6cb2a47
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