#include <conio.h>
main
bool stop = false; while (!stop) { system("cls"); // clear console // run your program int pressedChar = getch(); stop = pressedChar != 114; // 114 = 'R' } return 0;
==
stop = pressedChar == 'r';
<small>==</small>
<small>stop</small>
<small>stop = pressedChar != 'r'</small>
stop
true
<small>true</small>
<small>pressedChar != 'r'</small>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)