i am trying to make a simple snakes game without array but dont know how to make my snake move no key is pressed
#include<iostream>
#include<conio.h>
#include<windows.h>
using namespace std;
void gotoxy(short x, short y)
{
COORD pos = {x, y};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}
int main()
{ int x;
int y;
int n;
char ch;
x=10;
y=10;
At this point you will likely want to learn SFML. It's easy, much easier than using the console (you won't believe that at first), and it's the proper way to do this.
Also I don't see how you plan to keep track of the size and path of he snake without some sort of container.