Quote:Original post by villiageidiot
Success!
Thanks for the help you all...I cleaned up the code a little bit using for loops to check wins across the board and vertically, and two if statements to check the diagonals and ... it works!! I'm so excited...the hours finally paid off.
Have you tested a release build yet? I have a suspicion it may do strange things.
You're still using arrays as though they are 1 based, and while you may be able to get away with it enough for it to appear to work (since you're doing so consistently) you are in fact writing to areas of memory which don't strictly belong to you, which can cause weird bugs and crashes.
Debug builds have buffers at the end of arrays to catch overwriting of this nature - run it in a debugger and you'll probably get all sorts of runtime errors cropping up talking about damage after memory blocks. Release builds aren't so forgiving though, and you can get some really strange bugs with this sort of error.