Header file --- # include <***. h> and # include "***. H"

Source: Internet
Author: User

The header file contained in the "<>" method is used to allow the compiler to search for the corresponding header file in the preset standard path of the compiler. If no header file is found, an error is returned.

For example, the installation directory \ Microsoft Visual Studio 9.0 \ Vc \ include of vs contains the header file of the standard library.

The second method means to search in the path where the project is located. If the project fails, search in the standard path of the system.

Therefore, it is worth special attention that, if it is a standard library header file, you can use both the <> method and the "" method,WhileUser-Defined header files can only be "".

For example, the following method is correct:

# Include <iostream>High Efficiency

# Include "iostream"Low Efficiency

The following method is incorrect:

# Include <mytest. h> // mytest. H is the header file we created.

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.