Field Manual for Hackers

https://www.hackonly.com

Ethical Hacking Training Online | LearnSkill.Today

Ethical Hacking Training Online | LearnSkill.Today

Search

Labels

Labs Java PHP Python Network Security Quiz Android AWS C++ Web Application Security Exploit Writing Linux C Language Kali Linux Commands django Shell Script :Labs Cheatsheet How to Install MySql OWASP Penetration Testing Post Exploitation fix Android Pentesting Capture the Flag Case Study Hack the box SEO Sniffing TCPDUMP Tools Wireshark

Single Level Inheritance Example in c++



Example of  single level Inheritance  in c++


// Example of  single level Inheritance (A->B)
 #include<iostream.h>
 #include<conio.h>
 class A                // base class
 {
 public:
        void display()
        {
cout<<"Hello from A \n";
}
};

class B : public A // Now class B have public version of class A
 {
// now class B have display method of  parent class A
 };
 void main()
 {
 B obj;                 //object of child class
 clrscr();

Email ThisBlogThis!Share to TwitterShare to Facebook
Reactions:

  C++

Newer Post Older Post Home

Ethical Hacking Training Online | LearnSkill.Today

Ethical Hacking Training Online | LearnSkill.Today

Translate

Follow by Email

Copyright © Field Manual for Hackers | Designed by V2Geeks

TOP