A basic syntax question

This is a discussion on A basic syntax question within the C++ Programming forums, part of the General Programming Boards category; I have never really used while loops to build an array I think that might be where your problem is. ...

  1. #16
    Registered User
    Join Date
    Nov 2006
    Posts
    25
    I have never really used while loops to build an array I think that might be where your problem is. Try using a for loop

    Code:
    for(int i =0; i<8; i++){
     for(int j =0; j<8; j++){
       array[i][j] = 0;
    }
    }
    thats the syntax

  2. #17
    Registered User
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    267
    the array goes from board[0][0] to board [7][7]
    you went up to 8

  3. #18
    Registered User IdioticCreation's Avatar
    Join Date
    Nov 2006
    Location
    Lurking about
    Posts
    229
    Thank you CornedBee, that was the problem
    edit: and howee.
    I think I am done now, so thanks again for all the help with my dumb questions.

  4. #19
    MFC killed my cat! manutd's Avatar
    Join Date
    Sep 2006
    Location
    Boston, Massachusetts
    Posts
    870
    There are no dumb questions from those who try
    Silence is better than unmeaning words.
    - Pythagoras
    My blog

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. PlaySound
    By cangel in forum C++ Programming
    Replies: 16
    Last Post: 10-08-2009, 05:29 PM
  2. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  3. Basic question - press any key to continue
    By PedroTuga in forum C++ Programming
    Replies: 4
    Last Post: 05-19-2005, 10:38 PM
  4. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 12:10 AM

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