Why S1_ To use the header files

Why use the header file?

Various factors that do not know each caused

Solution: include the header file (the header file, contains an introduction description of related elements)

#include <Windows.h> represents all the contents of copies (copy) the file to Windows.h "here"

Find the path header file?

#include<Windows.h>

<> Represents, from the compiler to find the default file path Windows.h

The default path, depending on the compiler. Path different compilers different platforms are not the same.

Under this default path, already it contains all the header files c standard library needed

Use C ++ standard library header files in that way

 

#include"Windows.h"

"" Indicates Windows.h find files from the current directory
if not found in the current directory, and then find from compiler default path

User-defined header files used in this manner

 

Location of header files?

Requirements placed on the top of the file

#Include action is copied to the relevant statement within this document

So we are accustomed to #include files into the front

Guess you like

Origin www.cnblogs.com/lvcunda/p/12114357.html