gotoxy

Jan 2, 2011 at 8:23pm
is their any function gotxy??????is their any difference between gotoxy ang gotxy function
also provide header fil plzzzzzzzzzzzzz
Jan 2, 2011 at 8:30pm
Where did you hear of a function named 'gotxy'?

I assume that the 'gotoxy' function that you are referring to is this one http://wiki.answers.com/Q/What_is_gotoxy, right?
Jan 2, 2011 at 8:36pm
exactly....i know about it....bur i wanna to know that is their any func og gotxy instead gotoxy??
Jan 2, 2011 at 8:43pm
Someone may know exactly what you are talking about - I don't, but I suggest you try to explain a bit more about this 'gotxy' that you are seeking.
Jan 2, 2011 at 8:47pm
actually i know about func gotoxy but i saw a func gotxy in some C++ materials....i wanna to cnfirm that is their any function of this name
Jan 2, 2011 at 9:11pm
Yes, there is a function by the name of "gotoxy" in the non-standard (and non-portable) header file <conio.h> available with Windows C/C++ compilers. Please don't use it except for when you're required to use it in school. It isn't even useful on Windows really since the console is so limited. I don't know why Windows compiler vendors still keep it on life support.
Jan 2, 2011 at 10:38pm
What do you expect gotxy to do?

If you don't know what it does, then why do you care about it?
Jan 3, 2011 at 12:33am
gotoxy() function that set coordinates for command line interface.

http://codewall.blogspot.com
Last edited on Jan 5, 2011 at 2:33am
Jan 3, 2011 at 1:00am
closed account (3pj6b7Xj)
I know of gotoxy(int,int); but not gotxy()? sounds like a function that retrieves the co-ordinates of something, it could be anything.
Jan 3, 2011 at 3:30am
it's probably a typo.
Jan 3, 2011 at 4:09am
You may want to use the function SetConsolCursorPosition(), which belongs to the windows library. In fact, you can write your own gotoxy() using these function. For example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <windows.h>

void gotoxy( int column, int line )
  {
  COORD coord;
  coord.X = column;
  coord.Y = line;
  SetConsoleCursorPosition(
    GetStdHandle( STD_OUTPUT_HANDLE ),
    coord
    );
  }

int wherex()
  {
  CONSOLE_SCREEN_BUFFER_INFO csbi;
  COORD  result;
  if (!GetConsoleScreenBufferInfo(
         GetStdHandle( STD_OUTPUT_HANDLE ),
         &csbi
         ))
    return -1;
  return result.X;
  }

int wherey()
  {
  CONSOLE_SCREEN_BUFFER_INFO csbi;
  COORD  result;
  if (!GetConsoleScreenBufferInfo(
         GetStdHandle( STD_OUTPUT_HANDLE ),
         &csbi
         ))
    return -1;
  return result.Y;
  }


This code was not write by me, but by Duoas in an old topic: http://www.cplusplus.com/forum/beginner/4234/. Note that this gotoxy() may be use as the function gotoxy() from the conio library.
Hope I've helped you. And sory for my bad english, since it's not my first language.
Last edited on Jan 3, 2011 at 4:09am
Topic archived. No new replies allowed.