Thread: For Loop Error "error: expected identifier or '(' before '[' token"

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2012
    Posts
    10

    Question For Loop Error "error: expected identifier or '(' before '[' token"

    I am receiving this error various times
    ..\src\using-gpib_dll.c:97:18: error: expected identifier or '(' before '[' token
    The problem appears to reside inside my for loop:

    Code:
    for (loop = 0; loop < 30; loop++)
       {
          Instruments[loop] = (Addr4882_t)(loop + 1);
       }
    For some reason, 'Instruments[loop]' is not being detected as the declared array (see attached code). Did I declare it wrong?

    Thank you for any help.
    Attached Images Attached Images For Loop Error &quot;error: expected identifier or '(' before '[' token&quot;-unexpected_identifier-png 
    Attached Files Attached Files

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 10
    Last Post: 08-09-2012, 12:48 PM
  2. Error: expected identifier or ‘(’ before ‘{’ token
    By jpcanaverde in forum C Programming
    Replies: 66
    Last Post: 06-08-2010, 12:53 PM
  3. Replies: 9
    Last Post: 03-31-2009, 04:23 PM
  4. Replies: 7
    Last Post: 09-14-2008, 08:37 AM
  5. [HELP]Winsock Error "syntax error before ';' token"
    By C-isCool in forum C Programming
    Replies: 2
    Last Post: 07-05-2007, 07:32 PM

Tags for this Thread