|
-
May 4th, 2010, 12:07 PM
#11
Re: Constructor Inheritance
 Originally Posted by Lindley
Look closer: He's not calling constructors. Just normal methods called ConstructorMethod(). Slightly confusing, perhaps, but perfectly fine.
Not necessarily confusing. It's called the named constructor idiom. It is almost completely free from a performance point of view, and can be quite useful when constuctor arguments are not quite enough to set the constructors apart, or to really convey the nuances between the different constructors.
Is your question related to IO?
Read this C++ FAQ article at parashift by Marshall Cline. In particular points 1-6.
It will explain how to correctly deal with IO, how to validate input, and why you shouldn't count on "while(!in.eof())". And it always makes for excellent reading.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|