i have a homework for our programmin classes, i searched for other solutions regarding the gotoxy function, but all saw was for devc++, turboc++ and other IDEs, when i use the function for devc++ or turboc++, i know it wont work, but i tried it, says there's not library for gotoxy..


can somebody please help me?
:'(

so.. how am i goin to write my own? im still new to c++, and im not that familiar to the other programs, so,. i still have lots more to learn,. can you give me an example? well.. if you want,.that is.. ^^;

See the move() method in this library. I've never used it but it claims to work with console based windows apps. You may need to dig around a bit to figure out how to use the dll with your programs. I think something like this is the closest you are going to get. Either that or upgrade your Borland professor to a Microsoft one.

ahm. im using microsoft visual studio., not borland... ?O_o well,. thanks for the link,. ^^

Quoth the Dragon: gotoxy() is a function only supported by Turbo C and Turbo C++

I meant that your professor wants you to use these Borland functions :) so upgrade her/him to work with your Microsoft compiler

Comments
They should upgrade their professor to someone whio actually has a clue about something less than 20 years out of date

so.. how am i goin to write my own? im still new to c++, and im not that familiar to the other programs, so,. i still have lots more to learn,. can you give me an example? well.. if you want,.that is.. ^^;

Read the links I posted -- they will tell you how to do it.

If you're using windows then it's easy :)

void gotoxy(int x, int y) {
  static HANDLE hConsole = GetStdHandle( STD_OUTPUT_HANDLE );
  COORD c = {x, y};
  SetConsoleCursorPosition( hConsole, c );
}

Edited 6 Years Ago by William Hemsworth: n/a

that's the function that i have to use in C++? well,.thanks for your help.. :D

This article has been dead for over six months. Start a new discussion instead.