On 21 August 2014 10:31, Graham Bloice <graham.bloice@xxxxxxxxxxxxx> wrote:
> [snip] I've always had the idea that angle bracket form was for system or
> platform includes and quoted form for project includes, but maybe I was just confused.
Strictly speaking, according to the standard, both forms search “a sequence of implementation-defined places” for the defined header (not necessarily the same
set of places for the different forms). The definition of these search sequences for Visual Studio 2010 can be found in
http://msdn.microsoft.com/en-us/library/36k2cdd4(v=vs.100).aspx. GCC is similar (see
http://gcc.gnu.org/onlinedocs/gcc-4.1.2/cpp/Include-Syntax.html)
So generally the quoted form will search locally first (for a given value of locally) before searching in the specified include paths, whilst the angle bracket
form will only search the specified include paths. However this is not guaranteed (so a perverse compiler might search your complete hard drive for a matching file!)
Regards,
Graham
BAE Systems Integrated System Technologies Limited
Registered Office: Warwick House, PO Box 87, Farnborough Aerospace Centre, Farnborough, Hants, GU14 6YU, UK
Registered in England & Wales No: 3456325