A reference to a secondary pointer to a pointer

Source: Internet
Author: User

These two things in the past programming used a lot of times, but have been not very understanding of the principle, today I think for a long time, found a lot of niu Jiao Jian, the more I think the more do not understand the principle, so look up some information, is how many have some results, their own summary of it.

The secondary pointer, which is the pointer, is mainly to change the pointer itself data, where the pointer itself can be regarded as a variable, since it is a variable, it is certainly possible to modify its contents, so you can use a two-level pointer to change the pointer itself data.

A pointer to a reference, that is, a definition variable like *&, is beginning to understand this operator, because in my opinion, the pointer operator and the address operator should be reciprocal operators, put them together, can be offset, but the drill down, found that this is not the case, the operator is left-associative, That is, if you define a variable in this way: int *&i, then the combination should be: (int*) (&i), that is, this is a pointer-type reference, using this variable, you can manipulate the value of the pointer itself.

Then there is no pointer to the reference. The answer is no. Because the reference is not a variable, there is no pointer.

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.