#include<iostream> using namespace std; void useStatic(){ static int x = 10; cout << "useStatic x: " << x << endl; x++; cout << "useStatic x: " << x << endl; } void main() { useStatic(); useStatic(); getchar(); }
转载于:https://www.cnblogs.com/rotblatt/p/4605535.html