Tic Tac Toe Simple Game Needed!

This is a discussion on Tic Tac Toe Simple Game Needed! within the C++ Programming forums, part of the General Programming Boards category; I'm trying to create a simple Tic Tac Toe game in C++ for two players .. with the names inputs ...

  1. #1
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542

    Exclamation Tic Tac Toe Simple Game Needed!

    I'm trying to create a simple Tic Tac Toe game in C++ for two players .. with the names inputs and stuff ... the board should not be like graphical ... simple text .. using x and o.
    Thanks

    (Please send the file in .cpp extension)

    what does signature stand for?

  2. #2
    Registered User
    Join Date
    Jun 2002
    Posts
    79
    Do not worry about the warnings here, they can be removed mainly by type casting.
    Compiler:Borland C++ 5.0
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    208
    You Could prolly try doing it yourself eh.
    At least try and when u run into a problem then post ur problem on here. Thats what I do I get tons of help from these boards but I at least throw a half decent atempt at it first.

  4. #4
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    can somoene please edit it so it works in dev c++ 4?
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  5. #5
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    ive tried to, but i kept getting errors for something else, its all becuase of one sleep command, ive tried to change it to something else, even deleting it! no matter wut ive tried to do it gets errors, thats why i wanted someone to convert it so it will work in dev c++ 4 so i can see wut it should look like in dev c++ 4
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  6. #6
    . Driveway's Avatar
    Join Date
    May 2002
    Posts
    469
    Code:
    #include <windows.h>
    #include <iostream.h>
    
    void sleep(int sleep_for)
    {
           int started = timeGetTime();
           for(;;)
          {
                int current = timeGetTime();
                if(current-sleep_for>=started)
                       break;
          }
    
    }
    
    
    int main()
    {
          cout<<"I am sleeping..."<<endl;
          sleep(1000);
          cout<<"I am done sleeping...."<<endl;
          sleep(1000);
          return 0;
    }

  7. #7
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    i know how to use the sleep command, but it is acting up inside the source!
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  8. #8
    . Driveway's Avatar
    Join Date
    May 2002
    Posts
    469
    Yes, that would work

  9. #9
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    line:213 message: implicit declaration of function 'int sleep(...)'
    Code:
    sleep(2);
    is on line 213
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  10. #10
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    You could try searching Planetsourcecode.com before you start posting messages here looking for programs..

    Edit: Meh, you could try this source I made awhile back when I was first learning C++.
    http://www.d2backstab.com/~dualcatfish/Tic Tac Toe.cpp
    Last edited by Dual-Catfish; 06-27-2002 at 09:30 PM.

  11. #11
    Registered User
    Join Date
    Jun 2002
    Posts
    79
    Here is the compiled TicTacToe program along with source code, in a zip file. The compiler used was Borland C++ 5.0.
    Attached Files Attached Files

  12. #12
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    Thanks for all those replies!
    But... sorry to say .. I dont use Borland C++ Compiler.
    I use Visual C++ ... But as soon as i found out that everyone of you uses Borland .. I think it's better than C++ , Right?
    Oh well .. i know there's a free version of Borland C++ on the net, and if you recommend it .. i'll go find it and use it
    Thanks.
    what does signature stand for?

  13. #13
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    Can somebody do it in Dev-C++ ? Please
    Thanks
    what does signature stand for?

  14. #14
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542

    Lightbulb Here's my idea...

    The reason i didnt do it because: I Dont Know How!!
    what does signature stand for?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. tic tac toe troubles...
    By mkylman in forum Game Programming
    Replies: 8
    Last Post: 09-16-2006, 07:44 PM
  2. tic tac toe AI roadblock >:-(|)
    By dark_rocket in forum Game Programming
    Replies: 5
    Last Post: 06-12-2006, 06:13 AM
  3. tic tac toe game
    By Leeman_s in forum Game Programming
    Replies: 9
    Last Post: 04-24-2002, 04:24 AM
  4. my tic tac toe game, please try it
    By Leeman_s in forum C++ Programming
    Replies: 2
    Last Post: 04-14-2002, 06:16 PM
  5. Replies: 22
    Last Post: 11-08-2001, 11:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21