can someone explain where I've went wrong here ? Soon Please!! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

can someone explain where I've went wrong here ? Soon Please!!

21st Oct 2020, 7:56 AM
Siddiqa Tabassum K
Siddiqa Tabassum K - avatar
2 Answers
+ 3
What are you talking about?
21st Oct 2020, 7:57 AM
Abhay
Abhay - avatar
0
# include <iostream > using namespace std; class mybase { int a, b; public : int c; void setab (int i, int j) { a = i; b = j; } void getab (int &i, int &j) { i = a; j = b; } }; class derived1 : public mybase { // ... }; class derived2 : private mybase { }; int main () { derived1 o1; derived2 o2; int i, j; // ... } within main(), which of the following statements are legal? a. o1. getab (i, j); b. o2. getab (i, j); c. o1.c = 10; d. o2.c = 10; complete this problem with passing parameter from derived to base via constructor also create another class which inherits derived 1 and derived 2 class use protected member and variable in derived 1 and 2 which can access from child class but from other class. ​can anyone solve this program
21st Oct 2020, 7:58 AM
esha akter 44-4-150
esha akter 44-4-150 - avatar