The concept of C + + Primer notes 2

Source: Internet
Author: User

C++11 The new standard specifies that a data member can be provided with a class-within initial value. When an object is created, the initial value in the class is used to initialize the data member. With no initial value

The member will be initialized by default.


The restrictions on the initial values in the class are similar to those described earlier: either in curly braces or on the right side of the equals sign, remember not to use parentheses


Header files typically contain entities that can only be defined once, such as classes, const, and constpxpr variables.


Note: Once the header file is changed, the associated source file must be recompiled to obtain the updated declaration.


Types are divided into constants and extraordinary quantities, and a constant object must be initialized and cannot be changed once its value is initialized.


Default initialization initializes the initialization behavior that is performed by the class itself when the object is not shown to be given the initial value.

Initializes the behavior of the class object. The built-in type object of the global scope is initialized to 0: The local scope object is not initialized and has an undefined value.


Void* can point to any number of pointer types and cannot perform dereference operations


The void type is a type of special use that has no operation and no value. You cannot define a variable of type void.


The concept of C + + Primer notes 2

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.