fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. class A{
  6. static int x;
  7. public:
  8. A(int x_){x=x_;};
  9. void show(){cout<<x<<"\n";}
  10. void add(){x++;}
  11. };
  12. int A::x;
  13.  
  14.  
  15.  
  16. int main(){
  17.  
  18. A obj1(100);
  19.  
  20. }
  21.  
  22.  
Success #stdin #stdout 0s 3136KB
stdin
Standard input is empty
stdout
Standard output is empty