What is a "reference"? What are the issues to be aware of and use of "references"?

Source: Internet
Author: User

A reference is an alias for a target variable, and the action applied is exactly the same as a direct action on a variable. When declaring a reference, remember to initialize it. When the reference declaration is complete, the target variable name is equal to two names, that is, the target name and reference name, and the reference name cannot be used as an alias for the other variable names . Declaring a reference is not a new definition of a variable, it simply means that the reference name is an alias of the target variable name, it is not a data type in itself, so the reference itself does not account for the storage unit, and the system does not assign a storage unit to the reference . You cannot create a reference to an array.

What is a "reference"? What are the issues to be aware of and use of "references"?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.