I appreciate all the help you guys have been giving me previously. I wondering how the code works for setting the Enter key to continue through the loop on a program and if it is possible to allow any other key to exit out of the program?
cin.get()!EOF?
Code:
cout<<"To remain in the program, keep pressing ‘Enter’"<<endl;
cout<<"Enter any other character to leave:"<<endl;
int randnum;
while(cin.get()!=EOF)
{
num.RandInt(0,6);
randnum=num.RandInt(0,6);
cout<<"handles "<<handles[randnum]<<endl;
Bird.getKind();
Bird.getmoves();
Bird.getCall();
}
This allows me to keep pressing enter to stay in the loop, but I cannot quit the program without pressing ctrl + c.
Thanks again for all the help.