Is there any way of making a prog go back to the start or back to some place by just pressing a key once without having to type enter?
i know yuo can say something like
while(key=='y')
{
cout<<"do you want to go again y/n";
cin>>key
}
but i want it so as soon as you type n the prog goes back to the beginning of the while loop.