Programming and implementation of C + + programs

Source: Internet
Author: User

A program goes through the following steps from writing to finally getting the results of the run.

Writing programs in the C + + language
Programs written in high-level languages are called "Source programs". The source program for C + + is suffixed with. CPP (CPP is the abbreviation for C Plus plus).

Compiling the source program
In order for a computer to execute a high-level language source program, it must first translate the source program into a binary form of "object program" using a software called "Compiler (Complier)" (also known as a compiler or compilation system).

The compilation is compiled in the source program file as a separate unit. Target programs generally use. obj or. o as the suffix (an abbreviation for object). The role of compilation is to perform lexical and grammatical checks on the source program. All content in the file is checked at compile time, and all compilation error messages are displayed when the compilation is finished. There are two kinds of error messages in the general compiling system, one is error and the other is warning (warning).

Connect the destination file
When all errors are corrected and all are compiled, one or more target files are obtained. At this point, the system-provided "connector (linker)" To all the target program of a program and the system's library files and other information provided by the system to connect together, and eventually form an executable binary file, its suffix is. exe, can be directly executed.

Run the program
Run the resulting executable binary (. exe file) and get the result.

Analyze Run Results
If the results are incorrect, you should check the program or algorithm for problems.

Programming and implementation of C + + programs

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.