J
Jim Langston
What I want to do:
class MyClass
{
public:
struct
{
bool Enable;
bool Velvety;
float Density;
Fog(): Enable(false), Velvety(true) {}; // Won't work
} Fog;
};
The above won't work because the structure is not, in fact, named Fog, but
is an unnamed structure. I know I can give the structure a name I.E. struct
SFog, and use SFog(): Enable(false)... but I would rather be able to
override the constructor of the unnamed structure.
Is there some mechanism to do this?
class MyClass
{
public:
struct
{
bool Enable;
bool Velvety;
float Density;
Fog(): Enable(false), Velvety(true) {}; // Won't work
} Fog;
};
The above won't work because the structure is not, in fact, named Fog, but
is an unnamed structure. I know I can give the structure a name I.E. struct
SFog, and use SFog(): Enable(false)... but I would rather be able to
override the constructor of the unnamed structure.
Is there some mechanism to do this?