Putting something at a specified coordinate on the screen - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Putting something at a specified coordinate on the screen

ITAITA Posts: 463Member
I'm trying to develop a version of Tic-Tac-Toe (Noughts and Crosses) for the Linux command line but I'm stuck. I want to be able to draw at a specific coordinate or point on the screen (x,y). For example I want to place a X at point (1,2). How do I do this? I've done the same thing with .NET, it was easy, simply use the Point class but I'm puzzled as to how to do it in C++. Does C++ have a Point class or do I have to develop my own?

The main question I'm asking is how do I put something at a specific point (coordinate) on the screen.

Many thanks.

ITA


Comments

  • stoberstober Posts: 9,765Member ✭✭✭
    there is no standard c or c++ solution for that because it is operating system and often compiler specific. for *nix you can use either QT or the older curses libraries. you have to download them from the net because they are not standard with most compilers. good for them and you will find them.


    : I'm trying to develop a version of Tic-Tac-Toe (Noughts and Crosses) for the Linux command line but I'm stuck. I want to be able to draw at a specific coordinate or point on the screen (x,y). For example I want to place a X at point (1,2). How do I do this? I've done the same thing with .NET, it was easy, simply use the Point class but I'm puzzled as to how to do it in C++. Does C++ have a Point class or do I have to develop my own?
    :
    : The main question I'm asking is how do I put something at a specific point (coordinate) on the screen.
    :
    : Many thanks.
    :
    : ITA
    :
    :
    :

  • Ed HallEd Hall Posts: 395Member
    : I'm trying to develop a version of Tic-Tac-Toe (Noughts and Crosses) for the Linux command line but I'm stuck. I want to be able to draw at a specific coordinate or point on the screen (x,y). For example I want to place a X at point (1,2). How do I do this? I've done the same thing with .NET, it was easy, simply use the Point class but I'm puzzled as to how to do it in C++. Does C++ have a Point class or do I have to develop my own?
    :
    : The main question I'm asking is how do I put something at a specific point (coordinate) on the screen.
    :
    : Many thanks.
    :
    : ITA
    :
    :
    :
    [blue]
    I've seen something somewhere that suggests "ncurses" may have a gotoxy() routine, but I'm not familiar in any way with that platform.

    Take Care,
    Ed
    [/blue]


Sign In or Register to comment.