Jaspreet said:
Generally reserved for headers which are a part of the system package
Usually for user defined headers.
Those are backwards.
I am not sure but the compiler first starts looking in /usr/include or
the INCLUDE path for headers within <> and then searches in the current
directory if it does not find the header there.
For headers within "", the compiler first starts looking in the current
directory and then moves to the INCLUDE directory path.
Let me know if I am wrong.
You are wrong.
The <> notation directs the compiler to look in whatever it defines as the
"system directories" (which is dependent on the OS, and possibly on settings
the user can make to the OS, such as path variables). (Note that there IS
NO /usr/include on a Windows system.) In any case, provided that the
compiler has been "properly" installed (i.e., its libraries haven't been
manually fooled with), this notation specifies the "system" files, meaning
all the standard headers, plus any that have been installed in that same
path, plus any that might be included by the user having added to the system
path information.
The "" notation is generally used for "user" files, and can be just about
anything, depending on the compiler implementation. Generally, they're the
files that are somehow specified as part of the "project", or for which the
project has been told where to look for its source files (via "project
settings"), or files in the project's home directory.
So... use <> for the standard headers. Use "" for your own files. For
third-party files, it will depend on where they've been installed and how
your system+compiler+project are set up currently. You could try using <>
and see if that works. If not, use "". If it still doesn't work, look up
how to specify where to find user files in your compiler's documentation.
-Howard