Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

#include directive: relative to where?

I have looked in The C++ Programming Language to try to find the answer to this. When I #include "my_dir/my_header.hpp" in a header, where does it look for this file? Is it relative to the header, relative to the source file that included it, or something else?

like image 479
rlbond Avatar asked Mar 14 '09 01:03

rlbond


1 Answers

Implementation defined. See what is the difference between #include <filename> and #include “filename”.

like image 195
aib Avatar answered Sep 29 '22 04:09

aib