Bonita Montero writes:
#include <Windows.h>
#include <iostream>
#include <intrin.h>
using namespace std;
int main()
{
__try
{
__debugbreak();
cout << "hello world" << endl;
}
__except( []( EXCEPTION_POINTERS &ep )
{
ep.ContextRecord->Rip += 1;
return EXCEPTION_CONTINUE_EXECUTION;
}( *GetExceptionInformation() ) )
{
}
}
Try this with a signal handler, or you may prefer suicide.
I regret to inform you the unfortunate fact that you have confused comp.lang.c++ with Stackoverflow. It is the latter where this exact solution
is often offered as a cure-all that remedies all kinds of undefined behavior.
Your cooperation in ensuring that comp.lang.c++ remains unaffected by Stackoverflow is greatly appreciated.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)