We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Firstly virtual function only declear in side the person class and define his deraived class.and you can't define the virtual function in side the person class.only you can declear.
And we are refering getdata() to his person class.
I hope you understand.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Virtual Functions
You are viewing a single comment's thread. Return to all comments →
Firstly virtual function only declear in side the person class and define his deraived class.and you can't define the virtual function in side the person class.only you can declear. And we are refering getdata() to his person class.
I hope you understand.