From: http://blog.csdn.net/listening_music/article/details/6921608
The following is a brief introduction:
Pointer-for a type T, T * is the pointer type pointing to T, that is, a T * type variable can save the address of a t object, type t can be
Pointing to the use of struct-type variablesLet's first define the structure:struct STU{Char name[20];Long number;float score[4];} ;To define a pointer variable that points to a struct type variable:struct Stu *p1, *p2;Define the pointer variable p 1
In-depth analysis of PHP references (& amp;), in-depth analysis of php references. In-depth analysis of PHP references (lt; php $ a, which means that $ a and $ B point to the same variable. Note: $ a and $ B are exactly the same here. this doesn't
For those friends who are used to developing C, it may be confusing to see the & symbol appearing in C + +, because this symbol in C language takes the address character, but it has different uses in C + +, mastering the & symbol of C + +, is a good
PHP references and PHP references. PHP reference details, PHP reference details reference what is referenced in PHP means that different names are used to access the same variable content. This is not like the pointer of C. Instead, the reference is
Knowing what the difference between reference reference and pointer pointer can help you decide when to use reference and when to use pointer.In C + +, reference has the same capabilities as pointers (pointer) in many ways. While most C + +
Learn what the difference between reference reference and pointer pointer can help you decide when to use reference and when to use pointer.
In C + +, reference has the same ability in many ways as a pointer (pointer). While most C + + programmers
Original: http://www.cnblogs.com/GavinDai/archive/2011/10/24/2222735.htmlWe are in the program design, always use the definition of variables and the declaration of variables, but sometimes we are not very clear about the concept, know how it is
And about the value of delivery, pointer passing, reference transmission in these areas there will be misunderstandings, all I feel the need here also explain ~
Pointers are the same points and different points as references:
★ The same point:1.
Original article link
Pointers and references are quite different in form, but they all seem to have the same functionality and can directly reference objects and perform direct operations on them. But when should I use pointers? When can I use
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.