C + + Primer Plus version 6th

Source: Internet
Author: User

C + + Primer Plus version 6th

Source Code---Compiler---target code---Connector (startup code-Library code)---executable code

Source code extension: C cc cxx C CPP C + +

Compile and Link: Unix CC **.c------"**.O-----" a.out

Linux g++ **.cxx need to link the library when the command: g++ **.cxx-lg++; compilation of multiple Files g++ 1.cxx 2.cxx If you modify 1.cxx, you need to compile the command

g++ 1.cxx 2.o re-link the recompiled 1.o with 2.O.

Refer to the command Manual of the man help compiler in Linux or Unix

 

When the IDE finishes executing the program, close the window immediately after the program source code, you can add

Cin.get (); \ \ Join status Read Next keystroke wait until enter key is pressed

Cin.get ();

return 0;

2nd Chapter

1. Case-sensitive

2. #include <iostream> added preprocessed files

using namespace Std;

cout<< Endl; Start a new row

3. Add Cin.get () before return; Consistent open window does not close

4. Preprocessor compilation directive # include

5. Compile instruction using namespace

6. function Head C + + use int mian (void) This usage void indicates that no arguments are accepted

7. Comments//single line multiline with/* */

8. precompilation pre-compile the command after # for example iostream to compile the contents of Ioistream after replacing # with the writing of large code files into a compound file.

9. Above iostream if you need to have a. h suffix in C + + in C + + if you use the old header file in C, you can still use the. h extension But some files are removed by the. h extension and preceded by a prefix c for the file name to represent the header file library from the C language. For example, using MATH.H in C + + for Cmath This change is useful for containing namespaces.

10.

C + + Primer Plus version 6th

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.