[ create a new paste ] login | about

Link: http://codepad.org/J0X4VP1e    [ raw code | output | fork ]

C++, pasted on Mar 27:
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;
}


Output:
1
0


Create a new paste based on this one


Comments: