What are the benefits of a relative path such as “../include/header.h” for a header?

I prefer the path syntax as it makes it very clear what namespace or module the header file belongs to.

#include "Physics/Solver.h"

Is very self-describing without requiring every module to prefix their name to header files.

I almost never use the “..” syntax though, instead I have my project includes specify the correct base locations.

Leave a Comment