By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,260 Members | 1,305 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,260 IT Pros & Developers. It's quick & easy.

Can We make Virtual Contructors?

P: n/a
Hello Freinds
Is it possible to define a Virtual constructor?
if yes then how?
and if no , then how?
thanks

Jun 30 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a

<co******@gmail.com> wrote in message
news:11*********************@75g2000cwc.googlegrou ps.com...
Hello Freinds
Is it possible to define a Virtual constructor?
if yes then how?
and if no , then how?
If no, then how??? Um, by NOT doing it? :-)
thanks


Check the FAQ:

http://www.parashift.com/c++-faq-lit....html#faq-20.8

You might want to read the whole FAQ. It's very helpful.

-Howard
Jun 30 '06 #2

P: n/a
co******@gmail.com posted:
Is it possible to define a Virtual constructor?

No.

if yes then how?

Non-applicable.

and if no , then how?

How can something NOT be done?

Is this one of those "tree falling in the woods" questions?
--

Frederick Gotham
Jun 30 '06 #3

P: n/a
Frederick Gotham wrote:
co******@gmail.com posted:
Is it possible to define a Virtual constructor?

No.

if yes then how?

Non-applicable.

and if no , then how?

How can something NOT be done?


Easy, you do anything but that thing.
Jun 30 '06 #4

P: n/a
* co******@gmail.com:
Hello Freinds
Is it possible to define a Virtual constructor?
Use e.g. Google to look up the hundreds of previous threads on that topic.

Short answer: if you mean the idiom "virtual constructor", yes (and see
the FAQ); if you mean can you declare a C++ constructor as "virtual", no
(see your textbook); if you mean can we sensibly extend the language to
allow that, yes, in more than one way (see clc++m discussions of that).
if yes then how?
and if no , then how?


See above.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Jun 30 '06 #5

P: n/a

"Mark P" <us****@fall2005REMOVE.fastmailCAPS.fm> wrote in message
news:jo*******************@newssvr12.news.prodigy. com...
Frederick Gotham wrote:
co******@gmail.com posted:
and if no , then how?

How can something NOT be done?


Easy, you do anything but that thing.


Or, even easier...do nothing.

- Dennis
Jun 30 '06 #6

P: n/a
> How can something NOT be done?

Is this one of those "tree falling in the woods" questions?


Yep. Sort of like flying by throwing yourself
at the ground and missing.
Jul 1 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.