Skip to content

Instantly share code, notes, and snippets.

@0xa
Last active December 15, 2015 01:39
Show Gist options
  • Save 0xa/5181425 to your computer and use it in GitHub Desktop.
Save 0xa/5181425 to your computer and use it in GitHub Desktop.
struct Mere {
static const int Opcode;
};
const int Mere::Opcode = 42;
struct Fille : public Mere {
static const int Opcode;
// wuut
};
const int Fille::Opcode = 43;
#include <stdio.h>
int main() {
printf("%d; %d", Mere::Opcode, Fille::Opcode);
return 0;
}
// out: 42; 43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment