I'm hoping the OP considered this and is taking that into account in their solution. Dima Dima Wim ten Brink Wim ten Brink 25k 19 19 gold badges 75 75 silver badges bronze badges.
Virtual destructors, however, are another matter. You don't. You can't have 2 destructors in one class. What are you trying to accomplish? John Dibling John Dibling ZenOokami ZenOokami 2 2 gold badges 4 4 silver badges 12 12 bronze badges.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Does ES6 make JavaScript frameworks obsolete? Podcast Do polyglots have an edge when it comes to mastering programming Featured on Meta. Now live: A fully responsive profile.
Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. Accept all cookies Customize settings. Overloading Overloading is a design of object oriented programming where a member function or operator can take different arguments.
Overloading is also known as polymorphism. Here a function or operator is seen in different forms or prototypes keeping the name as same. Overloading is often needed when functions or operators can take various parameters. Constructor and member functions are often overloaded to ease the design and interface. Compiler makes a default constructior and default destructor which does not take any argument default constructior or destructor are argument less.
Now an objectioct might require various attributes to be assigned during construction. Destructor can not be overloaded - sumir manna December 03, Flag Reply. Add a Comment Add a Comment. Writing Code? Add Question. CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources. Open Chat in New Window.
What's Going On. Report a Bug or Issue.
0コメント