C + + Primer reading notes (i) First: C + + Overview, chapter I: Getting Started

Source: Internet
Author: User

1. Main content

This paper introduces the core idea of programming language and the basic concept of C + +.

The impression is more profound is divide and conquer (divide and Conque) decomposition thought.

2. Knowledge Square

1) C + + file suffix

    • CC, CPP,,CXX

2) compiler function

    • One, check for errors (syntax errors, type errors);
    • Two, code generation (generate target code or assembly instructions)

3) Implicit conversion of built-in types

    • int Intercept

4) #include指示符读入指定文件的内容.

    • <> represents a project or standard header file. Find from the environment variable path.
    • "" indicates that the user supplied the header file. Finds from the current directory.
    • Nested header files are introduced, prompting #ifndef to appear to avoid the introduction of a header file repeatedly.
    • C C + + name of the library header file: Cassert "requires the use of namespace Std to introduce C + + name definition", c name assert.h.

5) Define preprocessor constants

-D Name

__cplusplus:c++ file, __stdc__:c file

__time__: Time, __date__: date;

__FILE__: Compile file, __line__: number of compiled lines. "Can Change"

6) input/output stream

Standard Iostream:cin,cout,cerr are pre-defined iostream objects. Endl is a iostream operator that represents an operation that refreshes the output buffer in addition to the data that provides a newline character.

The file Fstream:ifstream,ofstream object.

C + + Primer reading notes (i) First: C + + Overview, chapter I: Getting Started

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