What's a substitute of gotoxy in C/C++ on Linux Platform

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Asad
    New Member
    • Oct 2006
    • 9

    What's a substitute of gotoxy in C/C++ on Linux Platform

    Hi All,

    I would like to plot some point on screen in C++. I am working on Linux platform and unable to use gotoxy(row,col) ; Which would have reduced my work.

    Any ways, Do anybody know how do I plot some points on screen on a Linux Platform using C++

    Help Appreciated!!!

    Thanks,
  • pjedson
    New Member
    • Oct 2006
    • 3

    #2
    You have got help here, but needed some effort form you :)

    Basic Graphics Programming With The Xlib Library

    Comment

    • madhusudankapoor
      New Member
      • Feb 2007
      • 2

      #3
      Originally posted by Asad



      Thanks,
      int Gotoxy(int x, int y)
      {
      char essq[MAX_SCREEN_AREA]={0}; // String variable to hold the escape sequence
      sprintf(essq, "\033[%d;%df", y,x);
      printf("%s", essq);
      return 0;
      }

      Comment

      • madhusudankapoor
        New Member
        • Feb 2007
        • 2

        #4
        Originally posted by Asad
        Hi All,

        I would like to plot some point on screen in C++. I am working on Linux platform and unable to use gotoxy(row,col) ; Which would have reduced my work.

        Any ways, Do anybody know how do I plot some points on screen on a Linux Platform using C++

        Help Appreciated!!!

        Thanks,
        #define MAX_SCREEN_AREA 100
        int Gotoxy(int x, int y)
        {
        char essq[MAX_SCREEN_AREA]={0}; // String variable to hold the escape sequence
        sprintf(essq, "\033[%d;%df", y,x);
        printf("%s", essq);
        return 0;
        }

        Comment

        Working...