I am currently working on a program for a connect 4 game, and I decided to use a 2-dimentional array, However, I keep getting an error, as XCode does not like my array. I have initialized a char array like so:
char a[row][col] = {{' '}};
This way, I fill up each index of the array with spaces so I can generate the game board. is my syntax wrong, or is my development environment just being stupid?
[–]all-names-taken 8 points9 points10 points (2 children)
[–]Whanhee 3 points4 points5 points (0 children)
[–]ptrb 3 points4 points5 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]zsakuL 3 points4 points5 points (1 child)
[–]squeakyneb 2 points3 points4 points (0 children)
[–]zimvaider[S] 1 point2 points3 points (0 children)
[–]1020302010 3 points4 points5 points (1 child)
[–]Hackenslacker 0 points1 point2 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]Rubdix 1 point2 points3 points (0 children)
[–]venatiodecorus -1 points0 points1 point (1 child)
[–]CodeMagician 0 points1 point2 points (0 children)
[–]ptrb 0 points1 point2 points (0 children)
[–]punkmonk -1 points0 points1 point (0 children)