when allocate memory to variables defined in the namespace
For example, assume a is a public static member in ClassA.
namespace SPACE{
ClassA::a=NULL;
ClassA::ClassA()
{
ClassA::a="initialized here";
}
}
So two questionF
when is a=NULL being invoked? Before main() or after that?
since a is a static member, why it can be defined twice with NULL and
ginitialized here"H
No comments:
Post a Comment