Mail Archives: djgpp/1999/02/16/22:04:40

Date: Tue, 16 Feb 1999 22:03:16 -0500
Message-Id: <>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <Pine.SV4.3.93.990217083639.18320A-100000@tagore>
(rajukv AT wipinfo DOT soft DOT net)
Subject: Re: constructor names
References: <Pine DOT SV4 DOT 3 DOT 93 DOT 990217083639 DOT 18320A-100000 AT tagore>
Reply-To: djgpp AT delorie DOT com

> In C++, can I call the constructor for a class by any other name?

No.  Why would you want to?  You almost never refer to it by name
anyway, but only by inference when you instantiate an object of that

	foo x;

	foo *x = new foo();

Since you can overload the constructor, you don't need different names
just to pass different arguments either.

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019