I'm a noob and i'm just coding a small program to test what i know but i've hit a problem with this piece of code:
i know my problem is that i'm initialising this array wrong however i don't know how to fix it to do what i want. Basically each part of this array is to store either a static space ,x or o. Someone i talked to this said i should initialize this as a string rather than char but i dont know how to do this.Code:char grid[3][3]; grid[1][1]=" "; grid[1][2]=" "; grid[1][3]=" "; grid[2][1]=" "; grid[2][2]=" "; grid[2][3]=" "; grid[3][1]=" "; grid[3][2]=" "; grid[3][3]=" ";
Can someone help me?



LinkBack URL
About LinkBacks


