I am trying to write a small tic tac toe game using
a char array and I was wondering if I need to allow for
a '\0'? Thanks for any advice.
Printable View
I am trying to write a small tic tac toe game using
a char array and I was wondering if I need to allow for
a '\0'? Thanks for any advice.
NULL terminators are only used in string, so unless your tic-tac-toe field is a string (why would it be? :)) you don't need it.
Um.. Yeah! I think I naturally associate any character array with strings, that's where I got confused. The array will hold characters that the user chooses as their token for the game. The whole thing will be three classes. CBoard, CPlayer and CTracker.