I'm still new to this. so I'm basically on a visual studio project. something called a console application.
#include <windows.h>
#include <iostream>
HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE);
COORD coords;
void setcursor(bool visible, DWORD size) { //if we set it to (0,0) in main. the cursor won't be there anymore. the size becomes 20, and it no longer becomes visible? that's the gist of it.
CONSOLE_CURSOR_INFO lpCursor;
if (size == 0) size = 20; //makes the cursor bigger so it won't show?
lpCursor.bVisible = visible;
lpCursor.dwSize = size;
SetConsoleCursorInfo(console, &lpCursor);
}
void gotoxy(int x, int y) { //to change the coordinates the text outputs to on the cmd
coords.X = x;
coords.Y = y;
SetConsoleCursorPosition(console, coords);
}
this thing(method?), below, called the "setcursor". after i make the cmd screen thing bigger and then even after I minimize it again afterwards. it stops working. the cursor thing appears again as though i never had that method set up. how do i make the cursor go for good.
int main()
{
gotoxy(4, 4);
setcursor(0, 0); //makes that cursor on the console that awaits your text input go invisible or something.
int x;
std::cin >> x;
std::cout << x;
}