⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stat_fun.cpp

📁 本代码是《C/C++程序员实用大全》的配套代码。网络转载
💻 CPP
字号:
#include <iostream.h>

class shared
  {
  	static int a;
    int b;
  public:
    void set(int i, int j) 
    {
      a=i;
      b=j;
    }
    static void show();
  };

int shared::a;		//	Define the a global variable

void shared::show()
  {
  cout << "This is static a: " << a << endl;
  }

void main(void)
  {
  shared x, y;

  x.set(1,1);
  y.set(2,2);
  shared::show();
  y.show();
  x.show();
  }







⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -