Thread: gotoxy(); help!!

  1. #1
    Registered User
    Join Date
    Sep 2008
    Location
    philippiines
    Posts
    10

    gotoxy(); help!!

    Hi!
    I try to use gotoxy function in my c programs but it doesn't work,Can I ask for a help?what is the proper use of gotoxy and its corresponding header file?
    thanks!!!

  2. #2
    The larch
    Join Date
    May 2006
    Posts
    3,573
    gotoxy is not a standard C function, therefore you'll need other libraries for that, for example OS specific API's. The FAQ contains an example how this could be done in a Windows program.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  3. #3
    Registered User
    Join Date
    Sep 2008
    Posts
    34
    Filipino professors are really dumb cause they always asks us to use non C standard functions

    Anyhow use this function as an alternative
    Code:
    void gotoxy(int x, int y)
    {
      COORD coord;
      coord.X = x;
      coord.Y = y;
      SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What is gotoxy??
    By Beachblue in forum C Programming
    Replies: 6
    Last Post: 11-23-2008, 01:24 AM
  2. Tic Tac Toe movement
    By $l4xklynx in forum Game Programming
    Replies: 4
    Last Post: 11-06-2008, 07:22 PM
  3. Want to see if I am using gotoxy the right way ...
    By o0obruceleeo0o in forum C++ Programming
    Replies: 5
    Last Post: 04-22-2003, 04:17 PM
  4. Is gotoxy ansi?
    By MeneLaus in forum C Programming
    Replies: 2
    Last Post: 05-18-2002, 02:48 PM
  5. is gotoxy a part of ANSI C 89 standard
    By kendals in forum C Programming
    Replies: 1
    Last Post: 03-20-2002, 07:43 PM