Den Inhalt des Links kenn ich schon, nur leider werde ich daraus nicht schlau
Ich hab versucht das
Code:
#include "windows.h"
bool checkConsoleBounds (int x, int y) {
if (x < 0 || y < 0) {
return false;
}
CONSOLE_SCREEN_BUFFER_INFO p;
GetConsoleScreenBufferInfo (GetStdHandle(STD_OUTPUT_HANDLE), &p);
SMALL_RECT r = p.srWindow;
return (x <= r.Right && y <= r.Bottom);
}
void gotoXY(int x, int y) {
if (checkConsoleBounds (x, y)) {
HANDLE hStdout;
hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
COORD coordScreen = { x, y };
SetConsoleCursorPosition( hStdout, coordScreen );
}
}
ind eine eigene Header Datei zu machen, der nimmt dann gotoxy nicht an