i want to go back to main menu while hitting escape key in my programme.
for that i have make a function.
void exit (char[])
{
if(char==27}
{
exit(0);
}
}
but i have many user inputs which are of type int,float,char.....
so i have tried,
while(kbhit!=27)
{
//coding
}
but after pressing ESC key nothing is done