Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Help

  • 19-02-2008 12:39AM
    #1
    Closed Accounts Posts: 11


    This is driving me Crazy. My compiler is giving me errors about my for statements. Tell me if im wrong but there is no semicollen after the for statement is there.

    is this right


    for(i=0, i<headernum;i++);


Comments

  • Moderators, Music Moderators Posts: 23,365 Mod ✭✭✭✭feylya


    for(i=0, i<headernum;i++);

    Should the bits in bold not be the same?...


  • Registered Users, Registered Users 2 Posts: 6,790 ✭✭✭cornbb


    The syntax should look like this:

    for(i=0; i<headernum; i++) // <-- no semicolon at the end of the line
    {

    }


  • Closed Accounts Posts: 11 Qin


    Well i guess i was wrong. Thanks for correcting me.


Advertisement
Advertisement