@Adak- I know you are really smart and experienced, but when you first started programming did pointers "BrainF**K" you at all? I know that pointers tend to have that affect on many people(including...
Type: Posts; User: camel-man
@Adak- I know you are really smart and experienced, but when you first started programming did pointers "BrainF**K" you at all? I know that pointers tend to have that affect on many people(including...
You are welcome. Yes read up on pointers, you will soon realize that the "ripple effect" that you described earlier will quickly fade after you notice how local variables only "work"(meaning you...
You will have to read up on pointers a little bit. Right now you are having trouble with the rows being displayed correctly, that is because your variables are local to there respective functions....
Lines 128 to 180 delete completely, it is redundant and unnecessary, It will also rid you the problem of double drawing the board.
Post your revised code
For problem number 1) remove line 79 and 182(the other drawnim in the while loop), it draws the board, but then you call your playnum function which in turn calls drawnim. That should solve the...
if(player == 1)
player = 2;
else player = 1;
that piece of code should be at the bottom of your while loop. Like I said earlier, you have redundant code in your while loop. Take a look...
player = player + 1;
//Think about that, you are incrementing player instead of switching back from player 1 to 2
You should replace that line with the line that you had before your while loop
...
Your if statement does not have a return value, yet your function has a return value of int. That is why you are getting that warning. Right now as you have it, you only return a 0 if the else is...
Yeah, I forgot to quote gratiafide, I was referring to his comment on the error he was getting.
for(int i = 0; i < row_1; i = i + 1)
You are probably compiling under an earlier standard like C89, which does not support declaring variables within a for loop like that.
@ Gratiafide it is is legal in C to declare your function definitions above main, thus leaving out the prototypes.
Here are some warnings I got trying to compile your code.
(36): warning #2235: Not all control paths return a value. <----- Check your function for all return types not just the Else statement....