Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7865073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:58:25+00:00 2026-06-02T23:58:25+00:00

Possible Duplicate: What is the difference between #include <filename> and #include “filename”? When I

  • 0

Possible Duplicate:
What is the difference between #include <filename> and #include “filename”?

When I written my programs, I include libraries like #include <iostream> . but also #include "iostream" is correct and the code would compiled without any error or problem.

So, I’m wondering what’s the difference between < > and " " ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:58:27+00:00Added an answer on June 2, 2026 at 11:58 pm

    When you use < >, the compiler only looks in the system-designated directory/directories (e.g., whatever you’ve set in the include environment variable) for the header.

    When you use " ", the compiler looks in the local directory first, and if that fails, re-searches just like you’d used < >. Technically, (i.e., according to the standard) that doesn’t have to be the “local” directory, but that’s how it works in essentially every compiler of which I’m aware).

    In case you care, the official wording from the standard is actually kind of vague (§16.2/2-3):

    A preprocessing directive of the form

    # include <h-char-sequence> new-line

    searches a sequence of implementation-defined places for a header identified uniquely by the specified
    sequence between the < and > delimiters, and causes the replacement of that directive by the entire contents
    of the header. How the places are specified or the header identified is implementation-defined.

    A preprocessing directive of the form

    # include "q-char-sequence" new-line

    causes the replacement of that directive by the entire contents of the source file identified by the specified
    sequence between the ” delimiters. The named source file is searched for in an implementation-defined
    manner. If this search is not supported, or if the search fails, the directive is reprocessed as if it read

    # include <h-char-sequence> new-line

    with the identical contained sequence (including > characters, if any) from the original directive.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: What is the difference between #include <filename> and #include “filename”? I just
Possible Duplicate: What is the difference between #include <filename> and #include “filename”? Difference between
Possible Duplicate: what is the difference between #include <filename> and #include “filename” Why do
Possible Duplicate: Should I include type=“text/javascript” in my SCRIPT tags? Difference between <script> tag
Possible Duplicate: What the difference between “$@” and “$*” in bash? For years and
Possible Duplicate: What is the difference between String.Empty and “” Is equivalent to String.Empty
Possible Duplicate: What is the difference between #include <filename> and #include filename? What is
Possible Duplicate: What is the difference between using #include<filename> and #include<filename.h> in c++ I've
Possible Duplicate: Difference in SQL Between operator and “>=” & “<=” operator I see
Possible Duplicate: C - Difference between char var[] and char *var? I have written

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.