Horje
cpp language explained Code Example
cpp language explained
#include <iostream>
using namespace std;
class BaseClass {
public:
   void disp(){
      cout<<"Function of Parent Class";
   }
};
class DerivedClass: public BaseClass{
public:
   void disp() {
      cout<<"Function of Child Class";
   }
};
int main() {
   /* Reference of base class pointing to
    * the object of child class.
    */
   BaseClass obj = DerivedClass(); 
   obj.disp();
   return 0;
}




Cpp

Related
build a prefix array cpp Code Example build a prefix array cpp Code Example
sort vector in reverse order c++ Code Example sort vector in reverse order c++ Code Example
find maximum sum of circular subarray Code Example find maximum sum of circular subarray Code Example
how to put string in array c++ Code Example how to put string in array c++ Code Example
c++ formatting Code Example c++ formatting Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
14