> Heh - perhaps he's German?
CamelCase gives me the hump
> Heh - perhaps he's German?
CamelCase gives me the hump
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
A few Other things
1) why would you fill a "char" board with numbers? Also, you'll need a 2-d array.
2) don't you think displaying the board in a "for" loop would be a lot more elegant?
3) what is the condition to win for gigantic tic-tac-toe boards?
My suggestion is that your checkWin function must be done with loops.
Have a look at my post here:
Connect 5 Algorithm in C
Note that with a board larger than 3x3, it is always possible for the starting player to get 3 in a row without the other player being able to stop them. Are you sure that is the actual winning criteria? Perhaps something like Gomoku is what you're really writing?
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"