Friday 15 July 2011

c++ - What does the word "reference" mean? -


When I saw it on the wiki, he said that it was a physical address of the data. But that does not mean the term used in my context:

"Table 6.1 reveals the operator's address and effect on the data type of reference."

This does not understand because & amp; Physical address, and therefore reference.

Also, both of them are called valp, and many "references"

What is the meaning of context in this situation?

Widely, there are two main ways to pass substrate values: values ​​and passages Pass from The difference is that in the passing of value, sub-routine gets a copy of the data, so that it can change the original without changing, while the change in the context of the data in the substrin is also visible by the collar nearby. Are there.

You are confused because C ++: There are two ways to pass things by pointers and context in context. Effectively, a C ++ reference is like an indicator; apart from this, you can call it on & amp; No need to use and * (you can not even point to arithmetic on references)

No comments:

Post a Comment