0

HELP ME!!

in this code at line 2 showing base::t1 is in accessible??why?? https://code.sololearn.com/c8VBVB6g0kwP/?ref=app

10th Mar 2021, 11:59 AM
__n
__n - avatar
6 Respuestas
0
Please help me😕
10th Mar 2021, 12:37 PM
__n
__n - avatar
0
Base class b is inherited with protected inheritance so you cant access it outside of that class or without inheritance relation in main class
10th Mar 2021, 12:37 PM
Jayakrishna 🇮🇳
0
Jayakrishna🇮🇳 can't access ouside of which class??
10th Mar 2021, 12:43 PM
__n
__n - avatar
0
You are using protected inheritance for base class so base class protected,public data are available as protected data by derived class object. so t1 becomes protected variable in derived class . you cant use t1 outside of it and not accessible in main method. (Outside of class derived)
10th Mar 2021, 12:53 PM
Jayakrishna 🇮🇳
0
Thanx i understood😄
10th Mar 2021, 5:00 PM
__n
__n - avatar
- 2
....
12th Mar 2021, 7:57 AM
Oroob Mustafa
Oroob Mustafa - avatar