Item 05. Reference (References Are Aliases, Not Pointers)

xiaoxiao2021-03-05  23

Item 05. References Area, Not Pointers 1, the three differences between reference and pointers: no vacant references, reference declarations need to initialize (born, death, death), reference to initialize its objects ( A lifetime)

2. It is a good idea to pass the parameters with reference to the reference.

3, very quoted references cannot be referenced as literal constants and temporary variables, only constant references

4. When the constant reference is initialized with a literal constant, it is reset to reference a temporary space initialized with the literal constant and life and death with the temporary space.

转载请注明原文地址:https://www.9cbs.com/read-38286.html

New Post(0)