delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/11/10:36:15

Date: Thu, 11 Feb 1999 10:36:04 -0500
Message-Id: <199902111536.KAA18291@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <36c399d2.18754602@news.okstate.edu> (marg@okstate.edu)
Subject: Re: Newbie Question (variable dec.)
References: <36c399d2 DOT 18754602 AT news DOT okstate DOT edu>
Reply-To: djgpp AT delorie DOT com

> int x;
> for (x=0;x<=10;x++) printf("%i\n",x);
> int y;
> for (y=0;y<=10;y++) printf("%i\n",y);
> 
> what I'm wondering is this just a part of standard C,
> is there some option that will change this?

This is not allowed in standard C.  You're thinking of C++, which does
allow this.

- Raw text -


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