Tic Tac Toe

Oct 7, 2016 at 5:40pm
I have an assignment to make tic tac toe on c++ using classes . I want to add a following feature for bonus part .
--> Instead of asking user where to put mark through keyboard , i want him to use mouse to click on the certain box to make his move. Kindly walk me through it as im not an expert of c++.
Thanks in Advance
Oct 9, 2016 at 7:03am
A mouse click will basically give you an event with the coordinates of the mouse-pointer at the time of the click. This means that in order to use a mouse click, your program has to be aware of the user interface. A console program for example is not aware of this, it just knows that there is a place where "data" can be read or written.

To the best of my knowledge, you will have to make a program with a graphical user interface to handle mouse clicks as input. This can be done in several ways depending on your platform, but to get any help you will have to choose something and provide more information about how you are setting things up.

Maybe you would like to Google for:
- c++ gui library
- win32 gui
- wxWidgets
- Qt
Topic archived. No new replies allowed.