Re-read C++primer plus 001

Source: Internet
Author: User

1. OOP emphasizes the decision-making during the run phase, not the compile phase, when the program is running, while the compile phase refers to when the compiler combines the program.

2. The value of the variable is stored in the stack, and new allocates memory from a memory area known as a heap or free storage area.

3. Static linking: It is added to the program at compile time.

Dynamic linking: Created when the program is running.

4. The array name is interpreted as the address of its first element, while the address operator is applied to the array name, resulting in the address of the entire set.

5. Automatic storage: Created in the function, run out and die.

Static storage: the means of storage that exists throughout the execution of the program.

Dynamic storage: The new and delete operators provide a more flexible approach than automatic variables and static variables. They manage a pool of memory, which is called a free storage space or heap in C + +.

6. Arrays, array, and vector differences: You can use standard array notation to access individual elements regardless of array, array, or vector object. Second, from the address, the array objects and arrays are stored in the same memory area stack, and the vector objects are stored in the heap, and thirdly, it is noted that an array object can be assigned to another array object, whereas for an array, the data must be assigned per element.

Re-read C++primer plus 001

Related Article

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: 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.