newbie question: #include <> or ""

This is a discussion on newbie question: #include <> or "" within the C++ Programming forums, part of the General Programming Boards category; I am newbie in C++. I would like to know which is the difference between: #include <file.h> #include "file.h"...

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    1

    newbie question: #include <> or ""

    I am newbie in C++. I would like to know which is the difference between:
    #include <file.h>
    #include "file.h"

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    <file.h> = standard header file
    "file.h" = your header file

    (That's what the distinction means to people reading it, anyway. What it means for the compiler is that it looks in different places for the file depending on which it is.)

  3. #3
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,252
    Files included like <this> are searched for ONLY in the include path.

    Files included like "this" are searched for first in the current directory, and then in the include path.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A newbie question...i think..
    By AbeMazur in forum C++ Programming
    Replies: 3
    Last Post: 02-24-2009, 11:34 AM
  2. 2d game
    By JordanCason in forum Game Programming
    Replies: 5
    Last Post: 12-08-2007, 09:08 PM
  3. newbie question
    By invisibleghost in forum C Programming
    Replies: 5
    Last Post: 08-23-2005, 12:56 AM
  4. Newbie Question: Can't use #include <string>
    By JohnnyCat in forum C++ Programming
    Replies: 7
    Last Post: 01-07-2005, 01:51 PM
  5. Headers that use each other
    By nickname_changed in forum C++ Programming
    Replies: 7
    Last Post: 10-03-2003, 04:25 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21