| delorie.com/archives/browse.cgi | search |
| Message-ID: | <422D62CDE87D144687C60CEC7419AD42048A67@sgkms01.uk.perrymail.com> |
| From: | "Ellingworth, Richard" <Richard DOT Ellingworth AT uk DOT perrymail DOT com> |
| To: | "'Djgpp (E-mail)" <djgpp AT delorie DOT com> |
| Subject: | Calling constructors |
| Date: | Thu, 24 Apr 2003 10:14:02 +0100 |
| MIME-Version: | 1.0 |
| X-Mailer: | Internet Mail Service (5.5.2653.19) |
| Reply-To: | djgpp AT delorie DOT com |
Hello. Sorry if this is a bit off-topic, but I have a C++ related question.
Is it OK to call constructors directly? For example, can you do this? :
class MyClass {
public:
MyClass( void )
{
MyClass( 0 );
}
MyClass( int n )
{
value = n;
}
private :
int value;
};
I'm beginning to rather suspect that you cannot, but I have yet to see it
written down in black and white.
Thanks,
Richard Ellingworth
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |