Thread: Help! Can't see the ERROR!

  1. #1
    Unregistered
    Guest

    Question Help! Can't see the ERROR!

    /* For Loop (#4 - a) */

    /* This program calculates the a range using a definate for loop. */

    #include <stdio.h>

    main()
    {
    int val; /* declare the value of the range */

    val = -10

    /* For Loop and Display */

    for (val = -10; val >= 10; ++val)

    printf("\n%d",val);
    printf("\n");
    }


    GETTING THIS ERROR!

    quiz4for4.cpp: In function `int main()':
    quiz4for4.cpp:15: parse error before `for'
    quiz4for4.cpp:15: parse error before `)'

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    > val = -10

    Your forgot a ; at the end of that line.

    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 09:15 PM
  3. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  4. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 01:10 AM