2 Replies - 718 Views - Last Post: 24 March 2012 - 07:06 PM Rate Topic: -----

#1 Crockeo  Icon User is offline

  • D.I.C Head

Reputation: 44
  • View blog
  • Posts: 247
  • Joined: 21-June 11

Referencing Headers That are in a Parent Directory

Posted 24 March 2012 - 06:37 PM

As the title suggests, I'm wondering if it's possible to #include a header file that's in a parent directory.

Lets say that there is a folder parent/child/ and within that there's a source file that wants to reference a header file in the parent folder.


Is it possible to do that?
If so, how so?


I'm getting back into C++ after using Java for a while, so I need to get reacquainted with the language.

Thank you!
~Crockeo

This post has been edited by Crockeo: 24 March 2012 - 06:38 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Referencing Headers That are in a Parent Directory

#2 jimblumberg  Icon User is offline

  • member icon


Reputation: 3989
  • View blog
  • Posts: 12,304
  • Joined: 25-December 09

Re: Referencing Headers That are in a Parent Directory

Posted 24 March 2012 - 07:03 PM

For relative access you can use the "../" notation.

Jim
Was This Post Helpful? 0
  • +
  • -

#3 Crockeo  Icon User is offline

  • D.I.C Head

Reputation: 44
  • View blog
  • Posts: 247
  • Joined: 21-June 11

Re: Referencing Headers That are in a Parent Directory

Posted 24 March 2012 - 07:06 PM

Ah, thank you. It makes sense, thank you again!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1