RE: [GD-General] not sure where to post this question... bit C++ implementation specific....
Brought to you by:
vexxed72
From: CAVEY G. <GER...@sg...> - 2004-07-07 09:52:29
|
> >How would that help? In C++ you simply cannot do this: > > int a =3D 6; > int array[a]; > >It is not possible to allocate arrays with variables (const or not = const). Guys How can you explain the following code compiles under = mingw32(IDE=3Ddevc++ 4987)? Do you use visual studio ? Anyway i ll it a try on solaris. int main(int argc, char *argv[]) { =20 const float ropeLength =3D 12.5f; const float knotSpace =3D 3.3f; =20 int array[ int(ropeLength / knotSpace) ]; =20 int a=3D6; int arraybis[a]; =20 return 0; } ************************************************************************= * Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite.=20 Tout message electronique est susceptible d'alteration.=20 SG Asset Management et ses filiales declinent toute responsabilite au = titre de ce message s'il a ete altere, deforme ou falsifie. D=E9couvrez l'offre et les services de SG Asset Management sur le site www.sgam.fr=20 ******** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited.=20 E-mails are susceptible to alteration. =20 Neither SG Asset Management nor any of its subsidiaries or affiliates = shall be liable for the message if altered, changed or falsified.=20 ************************************************************************= * |