Monday, October 11, 2010

Make operator = returns a reference point to * this



"Effective C + +" Reading Notes 10: make operator = returns a reference point to * this

General chain assignment methods:

int x, y, z;

x = y = z = 15; / / is equivalent to x = (y = (z = 15));

When we are to achieve their own operator = operation, the need to return a reference, the reference point to the operator on the left of the parameter; 1 class Widget

2 (

3 public:

4

5 Widget & operator = (const Widget & rhs)

6 (

7

8 return * this; / / return * this

9)

10);

* This is why the c + + standard to achieve the standard practice of not doing so can also be compiled, but as is the norm, they observe about it.







Recommended links:



The face of OOXML, how can we do?



MTS To MOV



What dealers NEED to support?



MJPEG to AVI



"Staying Princess" mercenary information finished



CMM assessment in China Suggestions



P2P operators transform their billing THROUGH traffic into the regular army



Premier Backup And Restore



How To Resolve Unable To Resolve Label Boot



"Xuanyuanjian rumor Han cloud" plot will flow Raiders



Recommend Audio Recorders



ASF to MPEG



Overall bandwidth of Thunder Edge Broadcasting below to see new resolution



No comments:

Post a Comment