Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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"
share|improve this question

closed as off topic by jw013, manatwork, rahmu, warl0ck, 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.

up vote 5 down vote accepted

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

share|improve this answer

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