How do you know that your class needs a virtual destructor?
Answer Posted / nishikant sahu
If programmer intended to act the class as a BASE class
somewhere then it is rule of thumb or good programming that
you have to have declare your constructor virtual.
| Is This Answer Correct ? | 3 Yes | 6 No |
Post New Answer View All Answers
What is tellg () in c++?
What is the role of static keyword for a class member variable?
What is basic if statement syntax?
Is it possible to get the source code back from binary file?
What are static and dynamic type checking?
What is type of 'this' pointer? Explain when it is get created?
Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300â€Â,â€ÂBullCart : 10â€Â) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side
What is a friend function in c++?
What is the main purpose of c++?
describe private access specifiers?
Explain unexpected() function?
How much is c++ certification?
How is objective c different from c++?
Can java be faster than c++?
Is swift faster than go?