test
This commit is contained in:
parent
37776af5db
commit
ab03d5f10c
4045 changed files with 286212 additions and 3 deletions
44
.config/Code/User/History/-2b6dc0c0/4X7m.cpp
Normal file
44
.config/Code/User/History/-2b6dc0c0/4X7m.cpp
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class A{
|
||||
public:
|
||||
A(){
|
||||
cout<<"A cstr\n";
|
||||
}
|
||||
void show(){
|
||||
cout<<"a show\n";
|
||||
}
|
||||
};
|
||||
class B{
|
||||
public:
|
||||
B(){
|
||||
cout<<"B cstr\n";
|
||||
}
|
||||
void show(){
|
||||
cout<<"b show\n";
|
||||
}
|
||||
};
|
||||
class C : public A, public B{
|
||||
public:
|
||||
C(){
|
||||
cout<<"C cstr\n";
|
||||
}
|
||||
void show(){
|
||||
cout<<"c show\n";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
int main(){
|
||||
|
||||
C obj;
|
||||
obj.show();
|
||||
obj.A::show();
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue