Search:

Type: Posts; User: Thinh Cao

Search: Search took 0.01 seconds.

  1. I'm running into trouble again :( This time I'm...

    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...
  2. Thank you so much for your help !!! btw if I...

    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...
  3. :D I'm sorry I typed them to quickly and forgot....

    :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;...
  4. Thank you qny for the reply, but it still prompts...

    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
    ...
  5. @Adak: Wow ! I tried it and it works flawlessly,...

    @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:...
  6. Thank you qny. I've tried it but it doesn't...

    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] = '-';...
  7. Thank you so much for the replies everyone ! ...

    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 ),...
  8. Using functions with pointer arguments - Connect 4

    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...
Results 1 to 8 of 8