// libcell implementation extern "C" { #include } #include "libcell.h" using namespace std; Exc::Exc(const char *m) : msg(m) {} Cell::Cell(int init) : val(init) { printf("(libcell) init %p -> %i\n", this, init); fflush(stdout); } Cell::~Cell() { printf("(libcell) free %p (was -> %i)\n", this, val); fflush(stdout); } void Cell::set(int x) { if (x < 0) throw Exc("< 0"); val = x; } int Cell::get() { return val; } Cell global_cell(3141592);