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.
No... the id is present in class constructor ... so, whenever the object is created then the "id" will be incremented...
This way, "curid" can be assigned the value of "id" for any given object .....
"curid" being an auto variable will be different for every object...
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 →
No... the id is present in class constructor ... so, whenever the object is created then the "id" will be incremented... This way, "curid" can be assigned the value of "id" for any given object .....
"curid" being an auto variable will be different for every object...