C ++ Primer Reading Notes (1) Article 1: C ++ overview, Chapter 1: Start, primer Reading Notes

Source: Internet
Author: User

C ++ Primer Reading Notes (1) Article 1: C ++ overview, Chapter 1: Start, primer Reading Notes

1. Main Content

This article introduces the core idea of programming language and basic concepts of C ++.

What impressed me a lot isDivide and conque)Decomposition idea.

2. Knowledge Square

1) C ++ file suffix

  • Cc, cpp, and cxx

2) compiler Functions

  • 1. Check errors (syntax errors and type errors );
  • Ii. Code Generation (Generating target code or assembly instructions)

3) implicit conversion of built-in types

  • Int Truncation

4) # The include indicator reads the content of the specified file.

  • <> Indicates a project or standard header file. Search for environment variables.
  • "" Indicates that the user provides the header file. Search from the current directory.
  • The introduction of nested header files promotes # ifndef to avoid repeated introduction of header files.
  • C ++ name of the C library header file: cassert [the definition of C ++ name needs to be introduced by using namespace std], and the C Name Is assert. h.

5) define Preprocessor Constants

-D name

_ Cplusplus: c ++ file, __stdc __: c file

_ TIME __: TIME ,__ DATE __: DATE;

_ FILE __: Number of compiled lines. [Changeable]

6) input and output streams

Standard iostream: cin, cout, and cerr are pre-defined iostream objects. The endl is an iostream operator, indicating an operation. In addition to providing line breaks, the output buffer is refreshed.

File fstream: ifstream, ofstream 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.