Now we discuss the new C + + / CLI environment, a cool feature, called the proxy constructor.
A class, there are multiple constructors often do; and that this constructor has a number of common code is also very often. In general, in this case, we are prepared for the common code a separate function, and then placed in each constructor call. Following example: class Foo
(
private:
int _mem;
public:
Foo (): _mem (0)
(
CommonConstructor ();
)
Foo (int mem): _mem (mem)
(
CommonConstructor ();
)
Foo (const Foo & f): _mem (f._mem)
(
CommonConstructor ();
)
/ / We need all the constructor's code
void CommonConstructor ()
(
printf ("Constructing the object");
)
);
Recommended links:
Ma: If you shut off Taobao fakes to be Off tonight
InuYasha process Raiders
UML: the perfect combination with the Zachman
Comments Trace And Ping Tools
DVR-MS to MP4
AMD Expects Q4 revenue to fall about 25%
Compilation of various source - inthand
choosing a quality Replacemment car battery
Using PHOTOSHOP build a passion Miyi chocolate effect
For You Science - Screen Savers
"Aion" 1.2 There are a brush obs of the bug is still alive
VOB To MPG
How to improve the AGENCY'S initiative
Cattle were made with Maya The whole process of real eye
FLV To PSP
No comments:
Post a Comment