+ 1

Function hiding and delete

Why d.display(1) is not working? I understand that function hiding comes into picture when we define one simillar function in derived class. I have deleted display(int ,int) version so okay to get it disabled from derived class. Why display(int) is still not accesible from derived class even though i have used using display from base ? https://code.sololearn.com/cQrrq3yTOW9T/?ref=app

29th Nov 2022, 2:59 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
4 Respostas
+ 4
because using is declared into private specifier list (the default in class declaration) try to add just before the using a public specifier as public: using base::display;
29th Nov 2022, 4:53 PM
KrOW
KrOW - avatar
+ 3
But still you are answering my questions 👍👍...this is the power of strong community... together we achieve more and better also
29th Nov 2022, 8:24 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 1
My bad 🤭 ... thanks
29th Nov 2022, 8:20 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 1
👍🏻... Your questions make me thinks that i have to update my knowldgments of c++ standards
29th Nov 2022, 8:21 PM
KrOW
KrOW - avatar