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.
This is a discussion on NULL terminating a multi dim char array within the C++ Programming forums, part of the General Programming Boards category; I am trying to write a small tic tac toe game using a char array and I was wondering if ...
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.
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
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.