I'm running into trouble again :(
This time I'm attempting to store the lowest row value of the columns to an int array, so I can keep track of the next piece dropped into that column. Here is my...
Type: Posts; User: Thinh Cao
I'm running into trouble again :(
This time I'm attempting to store the lowest row value of the columns to an int array, so I can keep track of the next piece dropped into that column. Here is my...
Thank you so much for your help !!!
btw if I changed the constant to a char, say I do:
#define RED 'X'
this is still correct and on the board, when I assigned an index to RED, it will appear on...
:D I'm sorry I typed them to quickly and forgot. I just re-compiled after checking it again carefully, but the same error message still pops up :(
int checkWin(char *grid) {
int i;
int j;...
Thank you qny for the reply, but it still prompts the same compiler error:
$ gcc project1.c -o project
project1.c: In function `checkWin':
project1.c:78: error: parse error before ';' token
...
@Adak:
Wow ! I tried it and it works flawlessly, but I don't really understand the part after the for loop in void print(). If you can elaborate it a bit, it would be great ! Thanks though.
EDIT:...
Thank you qny. I've tried it but it doesn't properly report the size of the actual grid
void printBoard(char *grid) {
int i;
for (i = 0; i < sizeof(grid) ; i++)
grid[i] = '-';...
Thank you so much for the replies everyone !
@std10093: For this project I have to use a single array of length 42 to represents the board game ( I think this complicates things quite a bit ),...
Hi all,
I just started programming in C (I've learnt Java and Python), and this concept of pointers is driving me crazy. I know that basis of pointers, but when applying to a more complicated...