I have made a game of Tic-tac-toe before using Javascript and C, so I thought about make a console based game of Tic-tac-toe using C++! (The code in C++ does not differ much compared to what I did in C!)
Compiler used: GNU G++
To compile and run the program,
(1) git clone https://github.com/kennerhartman/tictactoe-cpp.git
Ensure you have the GNU G++ compiler and make
installed to compile .cpp
files and run Makefiles. In the console,
(2) make main
(3) ./main or ./main.exe
Could I use headers? Yes. Did I learn much? No. As stated above, the code I used to make tic-tac-toe in C and C++ does not differ significantly. The only real difference is how I am outputting to the console and how I am taking in input from the console.
This project uses the MIT license. Please ensure you retain the license notice if you use any part of my program. For more information about the licensing of this project, please see LICENSE.md.