C programming: include directive: quotes or angle brackets?
Self-tutoring about c programming: the tutor mentions quotes versus angle brackets for header files.
The following is according to my understanding.
In c programming, one might need to include one or more header files that define functions, constants, etc. They are included, for example, using #include “a_header.h” or with #include <some_standard_header.h>.
Why, in some cases, is the header enclosed in quotes, while in others, in angle brackets? The quotes indicate the header file will be included in a given directory (the current one, perhaps), while the angle brackets indicate a library that’s already defined and standard in the c language. The compiler, typically, will know where to find such a file within the c installation.
Source:
learn.microsoft.com: Header files (C++)
cppreference.com: C Standard Library headers
Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.
Leave a Reply
You must be logged in to post a comment.