9 May 2020

C++. Include file. File Path

If the directory is in another path, you'll have to qualify the pathname. remember that .. goes one directory up. so, let's say the cpp file is in directory "myproject/a/source.cpp" and event.h is in "myproject/b/event.h". Your include would look like this:

#include "../b/event.h"

No comments:

Post a Comment

Popular Posts