All pastes #764361 Raw Edit

Something

public cpp v1 · immutable
·published 2007-11-07 03:25 UTC
rendered paste body
#include <iostream>using namespace std;class A {        private:                static int cnt;        public:                static void init() {                        A::cnt = 0;                };                static int next() {                        return ++A::cnt;                };};// initialize varint A::cnt = 0;int main() {        A::init();        cout << A::next() << endl;}