M
mike
Ok,
If I have the following code:
//main.cpp
class Base
{
public:
int static a;
};
int Base::a = 0;
class D1 : public Base
{
const b;
public:
D1() : b(a) {}
};
so on the construction of a D1 object, i intend it to store the value
of a. The code compiles and seems to be running fine I am just a bit
suspect! Is it ok to code like this??
Regards
Mike
If I have the following code:
//main.cpp
class Base
{
public:
int static a;
};
int Base::a = 0;
class D1 : public Base
{
const b;
public:
D1() : b(a) {}
};
so on the construction of a D1 object, i intend it to store the value
of a. The code compiles and seems to be running fine I am just a bit
suspect! Is it ok to code like this??
Regards
Mike