Alibabacloud.com offers a wide variety of articles about difference between reference and pointer, easily find your difference between reference and pointer information here online.
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
This article is reproduced from http://www.cnblogs.com/tracylee/archive/2012/12/04/2801519.htmlThe difference between a reference and a pointer in C + +The difference between pointers to different types is that the pointer type knows what the
The difference between pointers to different types is that the pointer type knows what the compiler interprets in memory content and size in a particular address (the address the pointer points to), whereas the void* pointer represents only one
Transfer from http://www.cnblogs.com/tracylee/archive/2012/12/04/2801519.htmlThe difference between a reference and a pointer in C + +The difference between pointers to different types is that the pointer type knows what the compiler interprets in
Http://blog.sina.com.cn/s/blog_673ef8130100imsp.html
A pointer passing parameter is essentially a value passing method, which transmits an address value. During the value transfer process, parameters in the form of the called function are
(1) The reference always points to an object, and there is no so-called null reference. All when it is possible to point to an object, you must use a pointer if you do not point to the object.Because C + + requires reference to always point to an
The difference between a pointer and a reference(1) The reference always points to an object, and there is no so-called null reference. All when it is possible to point to an object, you must use a pointer if you do not point to the object.Because C
Turn!!!! http://blog.csdn.net/wangqiulin123456/article/details/8464418Although you can access another value indirectly using both references and pointers, there are two important differences between them:
References always point to an
A reference is a pointer without a pointer syntax. Like a pointer, a reference provides indirect access to an object.
-- C ++ primer p29
Although a reference can also be used as a pointer, it is wrong to initialize a reference with an object address
Understanding the differences between reference and pointer can help you decide when to use reference and when to use pointer.
In C ++, reference has the same capabilities as pointer in many aspects. Although most C ++ programmers have some
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.