(Post READING) C ++ primer (Fourth Edition) Chapter 1 Quick Start

Source: Internet
Author: User
Now we can use the frameworks of variables, functions, and classes to construct a largeProgramBecause we are standing on the shoulders of giants.


I. Type : Tell the compiler how many bits are required, how to explain these bits, and which operation sets can be applied to the variable. Basic built-in internal type: INTEGER: integer character CHAR: 256 basic character wchar_t: Extended character set, such as Japanese and Chinese Boolean floating point type: Literal Value constant: It can only be called by value, and its value cannot be modified. The literal value constant also has a type.
Left value: it can appear on the left or right of the value assignment statement. The variable is the left value.
Right Value: it can only appear on the left of the value assignment statement. The literal value is the right value. 
Variable: 2. A library is a collection of classes. A library contains many standard classes, such as istream and iostream. CIN is the object of istream, cout, cerr, clog is the object of ostream, cout, clog are buffered, cerr is not buffered, read CIN will refresh the buffer. Note: istream and buffer are not a concept. The operating system operates on the buffer zone independently of the program. That is to say, we users do not know when the buffer will be refreshed to the output device, however, we can use the manipulator Endl to forcibly refresh the buffer. "Stream" indicates that characters are dynamically generated or consumed in chronological order. 3. Expression = operand + operator.
 
The smallest unit of computing. Each expression returns a result, for example, cout <'A'. The returned result is the output stream itself, therefore, cout <'A' <'B' can be used for writing.
4. Incorrect comments are worse than no comments, because they may mislead others. 5. The main task of the compiler is to find programs. Code Error Syntax Error Type Error declaration Error 6. When using a class, pay attention to three issues: Where to define the class and what operations are supported? 7. member functions are part of the object, because it will operate on a specific object

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.