gotoxy alternative?

This is a discussion on gotoxy alternative? within the C Programming forums, part of the General Programming Boards category; I just spent about an hour looking for the name of the function to move the cursor only to find ...

  1. #1
    Mmm. Purple.
    Join Date
    May 2002
    Posts
    154

    gotoxy alternative?

    I just spent about an hour looking for the name of the function to move the cursor only to find out my compiler (mingw) doesn't acctualy *have* it :/
    Anyone know an alternative?

  2. #2
    cwr
    cwr is offline
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    868
    Moving the cursor isn't part of standard C. Indeed, C does not have any concept of a cursor. There are various libraries that do this, the only one I can think of is ncurses.

  3. #3
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,801
    Woop?

  4. #4
    Registered User TactX's Avatar
    Join Date
    Oct 2005
    Location
    Germany.Stuttgart
    Posts
    65
    On Windows you would propably use SetConsoleCursorPosition(). MSDN is your friend.

  5. #5
    Mmm. Purple.
    Join Date
    May 2002
    Posts
    154
    That'd be great if this were acctualy a windows console, and not a command line app

  6. #6
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    My 6 part console tutorial cover this and many other things related to console programming.

    It is written in C++, but if you change the cout's to printf's most of it should work. The functions you will call will be the same of course.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  7. #7
    Bond sunnypalsingh's Avatar
    Join Date
    Oct 2005
    Posts
    162
    Quote Originally Posted by adrianxw
    My 6 part console tutorial cover this and many other things related to console programming.
    Nicely laid tutorials

  8. #8
    Registered User TactX's Avatar
    Join Date
    Oct 2005
    Location
    Germany.Stuttgart
    Posts
    65
    Quote Originally Posted by krappykoder
    That'd be great if this were acctualy a windows console, and not a command line app
    I don't get it. You're using MinGW, so you're using Windows. What exactly is wrong with SetConsoleCursorPosition()? What is the difference between a "windows console" and a "command line app" under Windows?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Tic Tac Toe movement
    By $l4xklynx in forum Game Programming
    Replies: 4
    Last Post: 11-06-2008, 06:22 PM
  2. Why do I need function for gotoxy and not getche?
    By Beholder in forum C++ Programming
    Replies: 1
    Last Post: 12-11-2005, 02:19 PM
  3. ASP.NET alternative to gallery.menalto.com ???
    By gicio in forum C# Programming
    Replies: 0
    Last Post: 05-15-2005, 11:31 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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21