example10.cpp
来自「Advanced Internet Programming Lecture 2 」· C++ 代码 · 共 26 行
CPP
26 行
#include <iostream>using namespace std;class shared {public: static int a;} ;int shared::a; // define aint main(){ // initialize a before creating any objects shared::a = 99; cout << "This is initial value of a: " << shared::a; cout << "\n"; shared x; cout << "This is x.a: " << x.a; return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?