#include extern "C" { void c_func(void(*)(void)); } void thrower (void) { throw int(0); } int main(int, char**) { try{ c_func(&thrower); } catch(int i) { cout << i << " catched." << endl; } }