0
Snake game
What is missing https://code.sololearn.com/c7x5CuujJjr6/?ref=app
8 odpowiedzi
+ 3
Your kbhit function syntex is incorrect you should write ! instead of underscore . The function which u used kbhit it will not work on solo or you can write any other conditions until user press any key your program should end or you can use any other plateform its not standard function second thing your
_getch()
is showing undeclared i think it should be getch or getchar may be you are trying to input one char if yes then you can use getchar in place of getch. getch is also a non standard function which is defined in
#include<conio.h>
it will not work here . In modern ide you don't need to write getch () for screen pause
+ 1
You can write any condition like this if user enter exit take this string as as input and compare it like this
If(entered string=="exit")
Then exit (0);
+ 1
If we remove kbhit then what will we use?
+ 1
Can you please tell me for which purpose u used it
0
Just for fun ha ha
0
I use exit but how
0
I used but still not running
0
How to start it