Re: Header Files
Re: Header Files
- Subject: Re: Header Files
- From: koko <email@hidden>
- Date: Tue, 30 Aug 2011 20:48:39 -0600
There is not a common parent directory so I did this:
in File1.cpp
#include "../PROJDIR/Folder A/Header.h"
and
In File2.cpp
#include "../PROJDIR/Folder B/Header.h"
So while Header.h is th esame name I get two different versions.
-koko
On Aug 30, 2011, at 7:49 PM, Conrad Shultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 8/30/11 6:07 PM, koko wrote:
>> Say I have two header files with the same name. (Long story as to
>> why so let's get past that for now).
>>
>> I put them in folders:
>>
>> Folder A Folder B
>>
>> So I have
>>
>> Folder A Header.h Folder B Header.h
>>
>> How do I construct my #include to get the header I want included as
>> in:
>>
>> implem1.cpp #include Folder A/Header.h
>>
>> implem2.cpp #include Folder B/Header.h
>
> You can simply make the common parent directory part of your header
> search path then include the files just as you did (with appropriate
> quotation marks).
>
> (I just wrote a trivial little C++ program and compiled with g++ on
> the command line to verify.)
>
> - --
> Conrad Shultz
>
> Synthetiq Solutions
> www.synthetiqsolutions.com
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iD8DBQFOXZM1aOlrz5+0JdURAhfEAJ9ZP/GTMcHmXZsY51uVx/s5nTN0nwCbBXZJ
> ufcR7zmJwHmsnxb+8rep/1A=
> =Vyhi
> -----END PGP SIGNATURE-----
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden