Static and ctr?
If I have a static member of a certain class, inside some other class.
Will that member's ctr be called?
Or do I need to explictly write something like
A Parent::meber_name;
Like you would do for primitive?
Thanks in advance.
You could be asking any of three different things, so you should probably try clarifying your point. Some sample code for what you're trying probably wouldn't hurt.
if you mean something like this:
then i'm pretty sure the constructor will be called.
class A { A() {} };calss B { static A a; };
then i'm pretty sure the constructor will be called.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement