0

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?
:'(

4
Contributors
8
Replies
9
Views
7 Years
Discussion Span
Last Post by DweyneAnne
Featured Replies
  • 1
    jonsca 1,059   7 Years Ago

    [quote] Quoth the Dragon: gotoxy() is a function only supported by Turbo C and Turbo C++ [/quote] I meant that your professor wants you to use these Borland functions :) so upgrade [I]her/him [/I]to work with [I]your[/I] Microsoft compiler Read More

  • If you're using windows then it's easy :)[CODE]void gotoxy(int x, int y) { static HANDLE hConsole = GetStdHandle( STD_OUTPUT_HANDLE ); COORD c = {x, y}; SetConsoleCursorPosition( hConsole, c ); }[/CODE] Read More

0

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.. ^^;

0

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.

0

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

1

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

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

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.

1

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 by William Hemsworth: n/a

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.