What is the difference between the #include "file.h" and the #include <file.h>? Surely they mean the exact same thing, because I have a file that has something like this:

#include <file1.h>
#include <file2.h>
#include "file3.h"
#include "file3.h"

closed as off topic by jw013, manatwork, rahmu, daisy, Ulrich Dangel Sep 12 '12 at 15:34

Questions on Unix & Linux Stack Exchange are expected to relate to Unix or Linux within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.


This has more to do with C and C++ than Unix, and as such belongs to SO.

To answer your question, the <> indicates headers in the standard library and "" the libraries written specifically for the project.

From the K&R:

Any source line of the form

#include "filename"


#include <filename>

is replaced by the contents of the file filename. If the filename is quoted, searching for the file typically begins where the source program was found; if it is not found there, or if the name is enclosed in < and >, searching follows an implementation-defined rule to find the file. An included file may itself contain #include lines

Not the answer you're looking for? Browse other questions tagged or ask your own question.