
- C++ Basics
- C++ Home
- C++ Overview
- C++ Environment Setup
- C++ Basic Syntax
- C++ Comments
- C++ Data Types
- C++ Variable Types
- C++ Variable Scope
- C++ Constants/Literals
- C++ Modifier Types
- C++ Storage Classes
- C++ Operators
- C++ Loop Types
- C++ Decision Making
- C++ Functions
- C++ Numbers
- C++ Arrays
- C++ Strings
- C++ Pointers
- C++ References
- C++ Date & Time
- C++ Basic Input/Output
- C++ Data Structures
- C++ Object Oriented
- C++ Classes & Objects
- C++ Inheritance
- C++ Overloading
- C++ Polymorphism
- C++ Abstraction
- C++ Encapsulation
- C++ Interfaces
What is the difference between #include and #include “filename”?
The difference between the two forms is in the location where the preprocessor searches for the file to be included.
#include <filename>
The preprocessor searches in an implementation-dependent manner, it searches directories pre-designated by the compiler. This method is usually used to include standard library header files.
#include "filename"
The preprocessor searches in the same directory as the file containing the directive. If this fails, then it starts behaving like the #include <filename> form. This method is usually used to include your own header files.
- Related Articles
- Difference between #include and #include "filename" in C/C++?
- What is the difference between include action and include directive in JSP?
- Difference between 'include' and 'extend' in Ruby
- What is a include directive in JSP?
- PHP include Statement
- Include keyboard text in HTML
- Why should I not #include ?
- What will be the result if DCLGEN is given with COPY statement and not INCLUDE?
- Include information about the document in HTML
- Fill in the blank: Grain or cereal crop include ......and......
- Create an INCLUDE in SAP system
- How does #include work in C++?
- How to create a Date object and what all parameters it include?
- How to include the character encoding in HTML?
- Explain include(),require(),include_once() and require_once() functions in PHP.

Advertisements