[GD-General] Variables scope
Brought to you by:
vexxed72
From: CAVEY G. <GER...@sg...> - 2004-02-04 09:11:15
|
Hi there Few days ago i switched to Visual c++ 6.0 and this is what i = discovered. The compiler accept the following C++ code : //first loop for(unsigned long b=3D0;b<MeshesArray[current].VerticesCount;b++) { ...//processing } //second loop=20 for( b=3D0;b<not_used*3;b++) { ... } But i thiink i should write the second FOR like this "for(unsigned long b=3D0;b<not_used*3;b++)" (i mean i should redeclare 'b' because it came = out of scope) When i tried the compiler answered me "error redefinition ..." !!! Did i forget to set an option ;it is a bit strange isn t it? Greetings=20 GC=20 ************************************************************************= * 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 ************************************************************************= * |