overloading new for a class & inheritance

A

Anthony

Hi,
I've got a question:
Does overloading new in a base class, works for for its derived classes?

context:
I want to allocate a specific class (state) and it's subclasses on a self
made stack.
Does anything go wrong when I do the following:
- overload new for class state
- add the stack as extra parameter to this new
Does this work for subclasses of state?

thanks in regard,
Anthony Lansbergen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,147
Messages
2,570,835
Members
47,383
Latest member
EzraGiffor

Latest Threads

Top