C + + Learning notes and thinking

Source: Internet
Author: User

1, built-in type: int float and other programming languages to define their own types

Class Type: A class that declares itself, that is, an abstraction of an object

2, const double *CP means that the CP is a pointer to a const type double type data, not a const pointer

3, typedef string *pstring;

Const Pstring CStr; The declaration is defined as a const pointer to an object of type CStr, where the const adornment is pstring. Equivalent to string *const CStr;

The const pointer can be placed before the type or can be placed after the type string const S1; const string S2;

4, strictly speaking, C + + does not have a multidimensional array, usually known as a multidimensional array is an array of arrays

5, switch structure, only after its last case label or the default label to define the variable is to avoid the occurrence of code skipping the definition and initialization of variables. In this case, you can introduce a block statement if you need to define a variable for a particular scenario. Because the variable will persist until the end of the block.

6, *dest++=*source++; equivalent to:

{

*dest=*source;

++dest;++source;

}

C + + Learning notes and thinking

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.