I got a for loop in my code.
For which i get this syntax error massage.
|11|error: 'for' loop initial declaration used outside C99 mode|
what these words mean?
i did a standart for loop.
I got a for loop in my code.
For which i get this syntax error massage.
|11|error: 'for' loop initial declaration used outside C99 mode|
what these words mean?
i did a standart for loop.
Last edited by transgalactic2; 12-05-2008 at 06:44 AM.
You probably tried to declare a variable in the for loop like this:
This is not permitted prior to the 1999 edition of the C standard, so you should write:Code:for (int i = 0; i < n; ++i)
Code:int i; for (i = 0; i < n; ++i)
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
I wish I could get a massage every time I got a syntax error!
"I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008
"the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010