What is the difference between #include <iostream.h> and #include "iostream.h"?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • niaz hussain
    New Member
    • Feb 2011
    • 1

    What is the difference between #include <iostream.h> and #include "iostream.h"?

    difference b/w #include <iostream.h> vs. #include "iostream.h "
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    every compiler has default include path.

    Whenever you include a header file with <> compiler look for include file at default path on the otherhand in case of double Quote it will look for header file in the same directory with the program source code if file is missing then it will look for n the default path. if missing in both place then generate error.

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      Also, <iostream.h> is pre-ANSI C++ from the time before 1998. No one should be using these old compilers. The ANSI C++ uses <iostream>

      Comment

      • donbock
        Recognized Expert Top Contributor
        • Mar 2008
        • 2427

        #4
        I don't know about C++, but in C the difference between angle brackets and double quotes is implementation-defined. There is no consistent or predictable difference that you can count on.

        Comment

        • mysticwater
          New Member
          • Aug 2010
          • 14

          #5
          "" signifies file is in nearby directories to project file. <> signifies file is in standard library and not nearby (usually near / root dir if you want to think in terms of UNIX file structure )

          Comment

          Working...