[ create a new paste ] login | about

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

C++, pasted on Aug 14:
#include<stdlib.h> 

class base
{
public:
    base(){x=5;printf(" %i ",x);}
    int x;
};

class medium1:virtual public base 
{
public:
    medium1():base(){};
};

class medium2:virtual public base{};

class top:virtual public medium1,medium2{};


int main() {
    top ten;
    getchar();
    return 0;
}


Output:
1
 5 


Create a new paste based on this one


Comments: