C++

Source: Internet
Author: User

  Like any other built-in type, a pointer defined within a block scope will have an indeterminate value if it is not initialized  2  . A method that defines a pointer type defines several pointer variables in a statement that must precede each variable with a symbolic pointer to store the address of an object, and to obtain an address, you need to use the address character (operator  &)  int  ival = 42  ;  int  *p = &ival;p  = &ival  *p = 42  ;p the address of the storage variable ival, Or P is a pointer to the variable ival  &ri = Ruiyruiy store Ri's address ri operation Ruiy object ri  = 100  ruiy  =-100  Span style= "color: #000000"; references are not objects, no actual addresses, and pointers to references cannot be defined;  
The value of the pointer (address) should belong to the following 4 states pointing to an object pointing to the next position of space immediately adjacent to the object null pointer means that the pointer does not point to any invalid pointer to an object.

  

1 trying to use uninitialized variables The 2 pointer does not point to any specific object, and attempting to access such pointer object behavior does not allow

C++

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.