Note: This essay is directly transcribed in the C++primer (fourth edition) Exercise solution (full version). Here is mainly for the convenience of my repeated reading later.
Exercise 1.1
Review the compiler documentation that you are using to understand the file naming conventions it uses. Compile and run the main program of this section.
Troubleshooting
In general, the C + + compiler requires that the compiled program be saved in a file. C + + programs generally involve two types of files: header files and source files. In most systems, the name of the file consists of a filename and a file suffix (also known as an extension). File suffixes usually indicate the type of file, such as the suffix of the header file can be. h or. HPP, etc.: the source file and suffix can be. cc or. cpp, and the specific suffix is related to the compiler used. The file name specification can usually be understood through the online Help documentation provided by the compiler.
C + + Primer fourth Edition after-school practice solution Exercise 1.1