Include File Inclusion command

Source: Internet
Author: User

# Include file inclusion commands are used to embed a source file into the current source file. # The include command can be used in the following two forms. # Include <File Name> # include "file name" Example: # include // stdlib. h: declare common system standard functions # include "myprg. H "// myprg. h: In the first form of declaring User-Defined constants, variables, and functions, the source file to be embedded is enclosed in angle brackets. In this form, the # include command tells the compile Preprocessing Program to search for embedded files in the header files of the editor or external library. These files are generally public header files provided by the system, stored in the include subdirectory in the system directory. In the second form, the source file to be embedded is enclosed in double quotation marks. The # include command in this form tells the pre-compilation command to first search for the file to be embedded in the current subdirectory (usually the User-Defined header file or source file). If no file is found, then search for the header files of the compiler or external library. According to the requirements of C ++ functions, if a function is called before, after the function is defined, or when a function defined in another file (such as a system library) is called, the function Declaration must be implemented first. System functions are divided into several databases based on their functions. Each database has a header file, which provides a prototype Declaration for a class of functions. Therefore, you only need to use the # include command in the program to include the corresponding header file, instead of directly declaring the function in the program.

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.