1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <iostream> using namespace std; struct Test{ int do_it() {return Test::sint;} static int sint; }; int Test::sint = 0; int main() { Test t; cout << t.do_it() << endl; }
1
0