Source: http://blog.sina.com.cn/s/blog_4ac766c00100qsbd.htmlhttp://blog.csdn.net/txh0001/article/details/7031058As a C + + rookie, in the precompiled header file (#include "stdafx.h") tangled for a long time, today intends to thoroughly understand
In fact, to understand the difference between a C file and a header file (i.e.. h), it is necessary to understand the compiler's work process, in general the compiler will do the following procedures:1. Preprocessing phase2. Lexical and grammatical
In fact, to understand the difference between a C file and a header file (i.e.. h), it is necessary to understand the compiler's work process, in general the compiler will do the following procedures:1. Preprocessing phase2. Lexical and grammatical
1.1. What are the differences between source code files and header files?
C ++ source code files are divided into two types: header files and source code files ). Header files are used to store object declarations such as type definitions, function
1. the header file is used for declaration instead of definition.
Remember the differences between definitions and declarations when designing header files. The definition can appear only once, while the Declaration can appear multiple times
. h files are generally used for definition, such as defining functions, classes, structures, etc.;The. cpp file is implemented as the definition of the enemy file.Include. h files, you can invoke functions, classes, and so on that you declare. Of
I. Pre-compiled header file usage experience:
If the Pre-compiled header file is used correctly, it does greatly improve the programming efficiency (How much time are you waiting for the compilation to complete? A lot of it, this time is generally
From a smaller program to a more complex program, the header file and the content of the source file is troubled for a long time, especially in the header file in the content, search for articles and a summary, if there is any mistake or debatable
1. Background
A good programming specification and style is a sign of a program ape maturity. Standard coding can reduce code redundancy, reduce error probability, facilitate code management and code communication, etc., in fact, its role is much
PHP automatically adds a bom header when downloading files, explains the BOM header, and removes the bom header ,. How to automatically add a bom header and explain the BOM header and remove the bom header when downloading a PHP file? First, you
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.