Thread: gotoxy....help

  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    13

    Unhappy gotoxy....help

    I m not able to use gotoxy func. I m using code::blocks. I tried to use the following func definition too.
    Code:
    #include <windows.h>
    
    void gotoxy(int x, int y)
    {
    COORD coord;
    coord.X = x;
    coord.Y = y;
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_H ANDLE), coord);
    }
    I m new to code::blocks...The only compiler I have used before is Turbo c++... Please help....

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    So what happened when you tried to use the [above] function definition?

  3. #3
    Registered User
    Join Date
    Dec 2010
    Posts
    13
    This what pops in the msg board....

    Code:
    ||=== word img, Debug ===|
    C:\Program Files (x86)\CodeBlocks\word img\main.cpp||In function 'void gotoxy(int, int)':|
    C:\Program Files (x86)\CodeBlocks\word img\main.cpp|10|error: 'STD_OUTPUT_H' was not declared in this scope|
    ||=== Build finished: 1 errors, 0 warnings ===|

  4. #4
    The larch
    Join Date
    May 2006
    Posts
    3,573
    The name doesn't have a space in it
    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).

  5. #5
    Registered User
    Join Date
    Dec 2010
    Posts
    13

    .

    oh.U are right.
    Thanks.......

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. gotoxy
    By BEN10 in forum C Programming
    Replies: 4
    Last Post: 08-03-2009, 12:11 PM
  2. Tic Tac Toe movement
    By $l4xklynx in forum Game Programming
    Replies: 4
    Last Post: 11-06-2008, 07:22 PM
  3. gotoxy(); help!!
    By clique in forum C Programming
    Replies: 2
    Last Post: 10-07-2008, 04:08 AM
  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