what is the meaning of this massage..

This is a discussion on what is the meaning of this massage.. within the C Programming forums, part of the General Programming Boards category; I got a for loop in my code. For which i get this syntax error massage. |11|error: 'for' loop initial ...

  1. #1
    Banned
    Join Date
    Oct 2008
    Posts
    1,535

    what is the meaning of this massage..

    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 05:44 AM.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,934
    Show the code. I can guess, but it would be much more accurate if I could see the code to verify my suspicion.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,630
    You probably tried to declare a variable in the for loop like this:
    Code:
    for (int i = 0; i < n; ++i)
    This is not permitted prior to the 1999 edition of the C standard, so you should write:
    Code:
    int i;
    for (i = 0; i < n; ++i)
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #4
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    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

  5. #5
    Banned
    Join Date
    Oct 2008
    Posts
    1,535
    Quote Originally Posted by laserlight View Post
    You probably tried to declare a variable in the for loop like this:
    Code:
    for (int i = 0; i < n; ++i)
    This is not permitted prior to the 1999 edition of the C standard, so you should write:
    Code:
    int i;
    for (i = 0; i < n; ++i)

    thanks
    that was the problem

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. the meaning of " >> "
    By arian in forum C++ Programming
    Replies: 8
    Last Post: 03-30-2005, 09:40 AM
  2. The Meaning of Life: A Trick Question?
    By chix/w/guns in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 07-12-2004, 07:53 PM
  3. meaning!!
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 07-22-2002, 07:52 PM
  4. would you help me with Linked list, please?
    By unhwan in forum C Programming
    Replies: 1
    Last Post: 06-11-2002, 12:24 AM
  5. WINAPI: Meaning of HDC ?
    By Mecnels in forum Windows Programming
    Replies: 1
    Last Post: 01-21-2002, 09:06 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21