One way is to signal an interrupt:
#include <csignal> // Generate an interrupt std::raise(SIGINT);
In C:
#include <signal.h> raise(SIGINT);
UPDATE : MSDN states that Windows really does not support SIGINT , so if portability is a problem, you are probably better off using SIGABRT .
HΓ₯vard S Dec 01 '10 at 16:22 2010-12-01 16:22
source share