Original Post
I'm just curious, but is there a way to define constructors for anonymous classes? Like defining one for: I know that you're able to use inheritance with anonymous structs:
struct { int x,y; } a;
struct A {
int x;
A() { x=0; }
void stuff() { printf("A! %d\n",++x); }
};
A a;
a.stuff();
struct : A {
int y;
//Ctor?
void stuff() { printf("Anon! %d %d\n",--x,++y); }
} anon;
anon.stuff();