Skip to content

Instantly share code, notes, and snippets.

@OdNairy
Last active December 18, 2015 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OdNairy/5813365 to your computer and use it in GitHub Desktop.
Save OdNairy/5813365 to your computer and use it in GitHub Desktop.
#import <iostream>
using namespace std;
class S{
public:
static int i;
S(){++i;}
S(const S& ob){++i;}
};
int S::i = 0;
int main(int argc, char* argv[]){
S v(S());
cout << S::i;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment