RE: C++ compiler issue

  • From: "Sean Farrow" <sean.farrow@xxxxxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Wed, 6 Aug 2008 14:27:03 +0100

Hi: 
The loop is declared:
for (z = 0; z < nCharacters; z++) 
Where z is not declared should declaring it in the loop solve the issue?
Sean.

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Sina Bahram
Sent: 06 August 2008 14:08
To: programmingblind@xxxxxxxxxxxxx
Subject: RE: C++ compiler issue

Without declaration of any kind?

That's impossible, end of discussion.

*chuckling*

I think you mean that it's declared in the for loop?

In the c99 standard, this is allowed, but in c89 and earlier, such a
practice was not permissible.

per haps some code would help ... just a small snippet?

Take care,
Sina



-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Sean Farrow
Sent: Wednesday, August 06, 2008 5:47 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: C++ compiler issue

Hi: 
When trying to convert a project from vs2003 to 2005, I have a for loop
where a variable is used with out declaration.
Two queries: 
1. did such a construct compile in vs2003? 
2. can I turn on a compiler option to enable this in vs2005?
Cheers
Sean.
 

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 3331 (20080806) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

 

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 3332 (20080806) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
 

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 3332 (20080806) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

Other related posts: