I am trying to write a simple program that simulates a calculator. I would like the program to exit or turn-off when the Ctrl+D keystroke is made. I se
If you need to terminate with Ctrl-D while reading input.
while ( std::cin ) // Ctrl-D will terminate the loop { ... }