Thread: how to use gotoxy()??

  1. #1
    Registered User
    Join Date
    Jan 2003

    how to use gotoxy()??

    I need an example of using the gotoxy() function.(using
    Dev-C++ compiler)

    Tell me what is wrong with this example program.. there is an error which is "C:\WINDOWS\TEMP\cc7HDdgb.o(.text+0x33):delete~1.c : undefined reference to `gotoxy' "

    int main()
    return 0;
    anyone has any suggestions??

  2. #2
    Registered User
    Join Date
    Nov 2002
    gotoxy() is not a standard function. From one of the FAQ's on THIS WEBSITE you can find:

    Q. No, really - I just want to do gotoxy!!!
    A. Sigh...

    #include <windows.h>

    void gotoxy(int x, int y)
    COORD coord;
    coord.X = x;
    coord.Y = y;
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_H ANDLE), coord);

  3. #3
    Registered User
    Join Date
    Jan 2003


    All right!! Thanks alot. it worked

  4. #4
    Registered User
    Join Date
    Aug 2010
    sir gotoxy 1st before printf

  5. #5
    Join Date
    Oct 2007
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    and the hat of sweating
    Join Date
    Aug 2007
    Toronto, ON
    Quote Originally Posted by sadamasam View Post
    sir gotoxy 1st before printf
    Do you really think he hasn't figured it out in the past 7 years???
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

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, 12:24 AM
  2. Tic Tac Toe movement
    By $l4xklynx in forum Game Programming
    Replies: 4
    Last Post: 11-06-2008, 06:22 PM
  3. gotoxy(); help!!
    By clique in forum C Programming
    Replies: 2
    Last Post: 10-07-2008, 04:08 AM
  4. 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
  5. Is gotoxy ansi?
    By MeneLaus in forum C Programming
    Replies: 2
    Last Post: 05-18-2002, 02:48 PM