Hello everyone, I just started programming a few months ago and now I have decided to start a Tic-Tac-Toe program in C++ to test my skills of arrays and more. So far, everything has been working fine and the program has been compiling, however, there is one problem. Every time I enter 3,3 for the rows and columns, the program fills in the spaces 3,3 AND 2,3. When I input 2,3, the program does not fill any spaces at all. Could someone help me find out how to fix this issue? Thanks.
On line 16, you print out board instead of board.
You should also initialize your variables starting at line 25 to default values. Uninitialized variables get garbage values and could be anything at runtime. For example, line 35 is basically random - i could be either true or false.