#include <boost/shared_ptr.hpp> or #include "boost/shared_ptr.hpp"?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Colin Caughie

    #1

    #include <boost/shared_ptr.hpp> or #include "boost/shared_ptr.hpp"?

    Is there a general rule/convention for when to use angle brackets and
    when to use quotes in #include statements? Is the angle bracket reserved
    for "system" header files (e.g. standard library headers), or is it for
    general "stable" include files?

    What about the grey areas in between these and actual application code,
    e.g. headers for a library that is under my control but external to the
    project being compiled?

    I know both styles work, and in the case of the Boost headers I've seen
    both of them used in example code, I'm just wondering if one is more
    "correct"?

    Cheers,
    Colin
  • Shooting

    #2
    Re: #include &lt;boost/shared_ptr.hpp& gt; or #include &quot;boost/shared_ptr.hpp& quot;?

    <>will search the system folder and project/IDE specified additional
    include dictionary
    "" will search in your project dictionary

    Colin Caughie wrote:
    Is there a general rule/convention for when to use angle brackets and
    when to use quotes in #include statements? Is the angle bracket reserved
    for "system" header files (e.g. standard library headers), or is it for
    general "stable" include files?
    >
    What about the grey areas in between these and actual application code,
    e.g. headers for a library that is under my control but external to the
    project being compiled?
    >
    I know both styles work, and in the case of the Boost headers I've seen
    both of them used in example code, I'm just wondering if one is more
    "correct"?
    >
    Cheers,
    Colin

    Comment

    Working...