Relative paths as headers in C

Status
Not open for further replies.

Manuv16589

Member level 1
Joined
Mar 15, 2012
Messages
34
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,474
Hi there,

I have seen a program with include as follows:

#include "../../Host/myfile/header.h"

What is meaning of this? What does ../ indicate? What does this relative path represent? Thanks in advance.
 

Normally ./ is the current folder and ../ is the previous folder(one folder back)
 

If you can provide your tree structure than it would be much easier to explain you.

But still I give a try.
for example this is you tree structure.
grandparent/parent/child/yourCfile.c then you must find your header file at this PATH grandparent/Host/myfile/header.h .
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…