Can anybody tell me which header file is used to define "gotoxy" in microsoft visual studio?
header file related to goto
Collapse
X
-
Tags: None
-
You use conio.h.
Be aware that this is not a standard function. In fact, everything in conio.h is really stuff peculiar to the Borland compiler so I recommend not using any of it.
Any sort of go-to programming is discouraged. -
In VS, windows.h has some console related functions. They're sort of involved though. here's a reference to some of them.
Code:string s = "some string to display"; HANDLE hcon = GetStdHandle(STD_OUTPUT_HANDLE); COORD curpos = { (80 - s.length()) / 2, 12 }; // x and y SetConsoleCursorPosition(hcon, curpos); cout << s << "\n";
Comment
Comment