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
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
C ++ Pointer and Reference vomit blood arrangement pointer & Reference, vomit blood Pointer
Many people have a headache and confuse when talking about the pointer of C ++. It is often confused with variable names, references, etc. In fact, the main
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.
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
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
To understand the difference between value passing, pointer passing, and reference passing, the main purpose is to understand the arguments and parameters of the function, the scope of the function (automatic variables, stacks), the layout of the
★Similarities:
1. All are addresses;
The Pointer Points to a piece of memory, whose content refers to the address of the memory, and the reference is the alias of a piece of memory.
★Differences:
1. the pointer is an entity, and the reference is
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
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 + +
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.