On Fri, 23 Sep 2005 09:20:58 -0700, SteveM wrote:
This is probably an easy answer but since I am fairly new to C++ for
some reason I can't see it :-( Any help would be appreciated
:-)
I have a class:
class AClass
{
public:
.
. (some functions)
private:
struct PData
{
static int aValue;
static int bValue;
}
}
I am clueless as to how to format the definition. Everything I have
tried up till now has been flagged by the compiler
Please Help
In a CPP file:
int AClass::PData::aValue;
int AClass::PData::bValue;
You can also initialize them:
int AClass::PData::aValue = 42;
int AClass::PData::bValue = 314;
- Jay