How do you include header files from top-level and sub-directories in c++?
A:
From the include directory? I guess you meant like:
#include <dir\header.h>
Ruel
2010-09-29 04:54:19
@Ruel Yes, using #include keyword.
xor
2010-09-29 05:05:52
if the header file is in the include directory use greater than and less than symbols (<>), if it's on the project directory or solution, use double quotations ("").
Ruel
2010-09-29 05:08:08
I'm begging you, please don't use backslashes... I know you think you're *never* going to port your application... but you might one day, and it will be a huge pain in the arse to change all your backslashed includes to forward slashes. VS will gladly use forward slashes, e.g. #include <dir/header.h>
ceretullis
2010-09-29 05:08:36