How would u close a window? its a
case 'Q':
case 'q':
{
//heres where if the user enters Q ..the code for the window to close
}
Printable View
How would u close a window? its a
case 'Q':
case 'q':
{
//heres where if the user enters Q ..the code for the window to close
}
btw its console in MS-DOS...not win32
case 'Q':
case 'q':
{
exit(EXIT_SUCCESS); //here if the code for close
}
You might have to #include <stdlib.h> I think.
if you just let that get you out of your loop then you may have to push enter once more, assuming that's there's a getch() of getcar() (similar) at the end of the loop but if nothing else is in the program but the loop it should end the program.
thanks guys:)