Answer Posted / r.r.bharti
It is an error to use both new and override on the same
member, as the two modifiers have mutually exclusive
meanings. Using new creates a new member with the same name
and causes the original member to become hidden, while
override extends the implementation for an inherited member.
Using the new modifier in a declaration that does not hide
an inherited member generates a warning.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why is static class not inherited?
What is encapsulation with real life example?
How is polymorphism achieved?
What is the main feature of oop?
Will I be able to get a picture in D drive to the c++ program? If so, help me out?
Explain virtual inheritance?
What is static in oop?
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.
What is overriding vs overloading?
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
what is different between oops and c++
What is the point of polymorphism?
What is class in oop with example?
What is and I oop mean?