From a396a688fe47046693fc7e9e051515b4c97fcac5 Mon Sep 17 00:00:00 2001 From: DEV TYAGI Date: Sat, 6 Oct 2018 15:41:10 +0530 Subject: [PATCH 1/3] the first commit --- a.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 a.txt diff --git a/a.txt b/a.txt new file mode 100644 index 0000000..e69de29 From 07f16ae03258314e2d0d189c20d79542fd77a4dc Mon Sep 17 00:00:00 2001 From: DEV TYAGI Date: Sat, 6 Oct 2018 15:44:32 +0530 Subject: [PATCH 2/3] the first commit --- a.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/a.txt b/a.txt index e69de29..3c18775 100644 --- a/a.txt +++ b/a.txt @@ -0,0 +1 @@ +the first commit From 4e7c18bdcf325277f1d5461b3802030e64f7c052 Mon Sep 17 00:00:00 2001 From: DEV TYAGI Date: Wed, 24 Oct 2018 16:32:57 +0530 Subject: [PATCH 3/3] single inheritance --- single_level_inheritance.cpp | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 single_level_inheritance.cpp diff --git a/single_level_inheritance.cpp b/single_level_inheritance.cpp new file mode 100644 index 0000000..3cc3c1e --- /dev/null +++ b/single_level_inheritance.cpp @@ -0,0 +1,49 @@ +//single level inheritance i.e taking one as a parent class and another as a child class +//Dtyagi-9 +#include +using namespace std; +class A +{ + +public: + int a,b; + A(){ + a=0; + b=0; + }; + A(int p,int q) + { + a=p; + b=q; + } + void getdata() + { + cout<<"enter the values in a and b \n"; + cin>>a>>b; + + } + + +}; + +class B:public A +{ +public: + +void display() +{ + cout<<"THE VALUES OF A AND B ARE: \n a="<