Variables scope

CAVEY GERARD <[email protected]>
Newsgroups gmane.games.devel.general
Message-ID <71A291D8E360AF4EA6FFFAF9CAD136CA0146F5E1@FR-MAILBOX2.fr.sgam.socgen>
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=0;b<MeshesArray[current].VerticesCount;b++)
		{
		...//processing
		}
//second loop 
		for( b=0;b<not_used*3;b++)
		{
		...
		}

But i thiink i should write the second FOR like this "for(unsigned long
b=0;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 
GC 


*************************************************************************
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. 
Tout message electronique est susceptible d'alteration. 
SG Asset Management et ses filiales declinent toute responsabilite au titre
de ce message s'il a ete altere, deforme ou falsifie.

Découvrez l'offre et les services de SG Asset Management sur le site
www.sgam.fr 

				********

This message and any attachments (the "message") are confidential and
intended solely for the addressees.
Any unauthorised use or dissemination is prohibited. 
E-mails are susceptible to alteration.   
Neither SG Asset Management nor any of its subsidiaries or affiliates shall
be liable for the message if altered, changed or falsified. 

*************************************************************************





-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_idU7
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.