Constructors in a composite class

Started by
21 comments, last by Sneftel 14 years, 2 months ago
myclass* a;


is not going to construct, and neither will any of its member classes, until you call


a = new myclass;


or something similar
"It's like naming him Asskicker Monstertrucktits O'Ninja" -Khaiy

Advertisement
And in just what way does that contradict my post?
Dude, it doesn't sorry for posting.
"It's like naming him Asskicker Monstertrucktits O'Ninja" -Khaiy

Quote:Original post by mrchrismnh
myclass* a;


is not going to construct, and neither will any of its member classes, until you call


a = new myclass;


or something similar
I'm not sure if you mean for a to be a member of the class in question or to point to the object that's being constructed, but in either case, your example doesn't introduce any exceptions or special cases as far as the OP's question is concerned.
Oh lawd a mercy.
"It's like naming him Asskicker Monstertrucktits O'Ninja" -Khaiy

Quote:Oh lawd a mercy.
Hm. Honestly, I'm not really clear as to what your objection is. The questions that have been asked and the points that have been made all seem pretty reasonable.

If you feel otherwise, why not post something meaningful explaining your views? As is, it's not very clear what you're trying to say.
I already apologized for posting.
"It's like naming him Asskicker Monstertrucktits O'Ninja" -Khaiy

Technically; myclass * a; does initialize an instance of myclass *, as expected. I think you're confusing the types of an object and a pointer to an object, which are totally distinct.

[size=1]Visit my website, rawrrawr.com

Quote:Original post by mrchrismnh
I already apologized for posting.

Goddamn, son. You just don't switch off, do you?
I think some people may be a little too impressed with themselves.
"It's like naming him Asskicker Monstertrucktits O'Ninja" -Khaiy

This topic is closed to new replies.

Advertisement