www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2008/10/19/09:23:09

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:message-id:date:from:to
:subject:mime-version:content-type;
bh=RLyakr1GldrV1vpXVHkGveOt4TJrTYWDbI1cVhPmVcs=;
b=iVmXaCGCPook67ml9Q+KjVkU9MmSnLuLc3kuXGdUTciTeASPqbQ4Go0vQ7jfYoV4rS
eDWEW50idlfQ1YiNAkTpyq7UUR8VjCwIMQdZdTIbVcL/kXtF69BonlriWnhbUZ/kXi3n
hMv0i6YG6vVNCbASCEqE4+SBKwos6z+GYXc6Y=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=message-id:date:from:to:subject:mime-version:content-type;
b=t+dX4Ve+7zFKjlYaERL8tccgmgoQyRqjZ31OTdCm00QK3HJRDlUelYr7cyhhpJ8WsV
1OfHg+45rKxt+eikf5a7DtEH4HEZ/RuBAxdK1H/ZoFUf5Qgsul+n/nQ4JFimBmHx1Vhd
1oGCEHCF2C3NNaCpKaU2SzBzHgUIulMQhQk+w=
Message-ID: <516fae4a0810190550v6a545ab8s776cf48ccbf75cbc@mail.gmail.com>
Date: Sun, 19 Oct 2008 14:50:48 +0200
From: "Valentina Poletti" <jamwally AT gmail DOT com>
To: djgpp AT delorie DOT com, twister AT sifter DOT org
Subject: question for c++ experts
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

------=_Part_79233_6306669.1224420648593
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I have a class, A, whose constructor necessitates a parameter, say a float.
class A {
  public:
  A(float);
}

now, I want to create an array of such classes

A* array;
array = new A[4];

but how do I pass the parameter?

------=_Part_79233_6306669.1224420648593
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div dir="ltr">I have a class, A, whose constructor necessitates a parameter, say a float.
<div><br></div><div>class A {</div><div>&nbsp;&nbsp;public:</div><div>&nbsp;&nbsp;A(float);</div><div>}</div><div><br></div><div>now, I want to create an array of such classes</div><div><br></div><div>A* array;</div><div>array = new A[4];</div>
<div><br></div><div>but how do I pass the parameter?</div></div>

------=_Part_79233_6306669.1224420648593--

- Raw text -


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