Here’s my code below for the snake game loop in C which works in Codeblocks:
int ResetScreenPosition() {
HANDLE hOut;
COORD Position;
hOut = GetStdHandle(STD_OUTPUT_HANDLE);
Position.X = 0;
Position.Y = 0;
SetConsoleCursorPosition(hOut,Position);
}
Can anyone tell me how to make the cursor go back to position(0,0) which makes the loops go on in Linux with text editor vim?