C + + Primer Plus (i): Start learning C + +

Source: Internet
Author: User

Programming features of the 1.c++:

(1) Structured programming: composed of if,for,while and other statements, emphasis on algorithm design, top-down design principles;

(2) Object-oriented programming: composed of classes, objects, etc., emphasizing the design of data, bottom-up design principles;

(3) Generic programming: composed of templates; emphasizes the creation of code modules suitable for various data types;

2. Source code-(compile)--Target code--(link)--executable file

3. Preprocessor handles compile directives with names beginning with #: #include <iostream>

The 4.c++ header file does not have an extension, and the C header file extension is. h; After the C header file is converted to a C + + header file, the file is renamed and the suffix is removed. h plus prefix C;

5.1) The namespace compiler directive is a C + + feature, variable, function, class is a standard component of C + + compiler, placed in the namespace STD, so the C + + header file variables, functions, classes, etc. are also placed in the STD;

2) using namespace std/using std::cout

The end of the 6.main function should be preceded by a return 0 statement;

7. When outputting, cout uses the operator to insert a string into the output stream, and the CIN use operator extracts characters from the input stream when entered;

C + + Primer Plus (i): Start learning C + +

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.