# Include & lt; & gt; and # include,

Source: Internet
Author: User

# Include <> and # include,

I. # include <>

# Include <> references the header file in the compiler's class library path.

If the built-in header file defined by your compiler is referenced under C: \ Keil \ c51 \ INC \, then # include <stdio. h> C: \ Keil \ c51 \ INC \ stdio is referenced. h this header file, no matter what directory your project is in, C: \ Keil \ c51 \ INC \ stdio. h. The path is fixed. Generally, some header files, such as stdio, are referenced. h. conio. h, string. h. stdlib. h and so on.

Ii. # include <>

# Include "refers to the header file in the relative path of your program directory.

If your project directory is in D: \ Projects \ tmp \, then # include "my. h "references D: \ Projects \ tmp \ my. h this header file is generally used to reference some header files written by yourself. If # include "" is used, it will first find whether there is a corresponding header file in the current directory of your project. If not, it will still find the corresponding header file in the corresponding reference directory. For example, use # include "stdio. h "if there is no stdio in your project directory. h. The header file will still be located in C: \ Keil \ c51 \ INC \ stdio. h.

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.