[ create a new paste ] login | about

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

C++, pasted on Jun 21:
#include <bits/stdc++.h>
using namespace std;

//Base class
class Parent
{
    public:
      int id_p;
};
 
// Sub class inheriting from Base Class(Parent)
class Child : public Parent
{
    public:
      int id_c;
};

//main function
int main() 
   {
     
        Child obj1;
        Parent obj2;
        Child *pChild = &obj1;
        
        
}


Output:
1
Line 24: error: bits/stdc++.h: No such file or directory


Create a new paste based on this one


Comments: