Posts

Showing posts from July, 2018

Source code of Tic-Tac-Toe Reloaded

Image
You can download the source code from here:                  For Automatic Mode : Automatic                  For Manual Mode: Manual You can run it on Visual Studio. If you first time trying visual studio then you have to make a new project as given below. File->New->Project->Visual c++->Window Desktop->Windows Console Application  After giving the name and finish you can copy the code from above file and paste it into your application.  After running this program, You can see the saved results by going to the  directory where project saved and see the files shown below:

Simple Tic-Tac-Toe

Image
Below you can find the code of Simple Tic Tac Toe in C++ and little explanation how it works. If you copy and paste this code, it works fine in Visual studio or with any C++ compiler. If you are already familiar with  Tic Tac Toe code in c++, then you can directly move to my game. Otherwise you should first try this and understand it.. I have explained working of all these functions below this code.   #include <iostream.h> //<iostream> in vs2017   using namespace std;   char square[10]={'o','1','2','3','4','5','6','7','8','9'};   int checkwin();   void board();   int main()   {        int player=1,i,choice;        char mark;        do       {          board();          player=(player%2)?1:2;           cout <<"Player"<<player;       ...