Skip to content

Instantly share code, notes, and snippets.

@sharth
Created October 3, 2012 23:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sharth/3830572 to your computer and use it in GitHub Desktop.
Save sharth/3830572 to your computer and use it in GitHub Desktop.
class X {
public:
X() {
this->val = rand();
}
int val;
};
static X global_value;
extern "C" {
int compute() {
return global_value.val;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment