[ create a new paste ] login | about

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

C++, pasted on Mar 17:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include<iostream>
using namespace std;

class base{
   const static int m=5; 
    enum {c1 = 10};   
    const int &i;
  public:
    base(int z ): i(z) {cout <<"i is " << endl;}
};

int main()
{
  base obj(5);
  cout <<sizeof(obj)<<endl;  
    
}


Output:
1
2
i is 
4


Create a new paste based on this one


Comments: