Re: Problem declaring struct
Re: Problem declaring struct
- Subject: Re: Problem declaring struct
- From: Aaron Montgomery <email@hidden>
- Date: Sat, 12 May 2007 17:18:15 -0700
On May 12, 2007, at 4:57 PM, Joshua Pennington wrote:
If you are working with Cocoa, you can use #import xxheaderfilenamexx
to make sure the header is included only once. That only works with
Obj-C, so you may wish to use the header guards instead, if you are
going to use the headers with vanilla C or C++ programs.
On 5/12/07, Aaron Montgomery <email@hidden> wrote:
#pragma once
that you can use telling the preprocessor to only process the
contents of the file once.
Answering the question made me aware of that I didn't know what gcc
did, so I did a quick search for "gcc #pragma once". It seems that
both #import and #pragma once are deprecated by gcc. Given that, I
retract my #pragma once suggestion and suggest just using header
guards. You can do the search to get info about why they were
deprecated.
Aaron
_______________________________________________
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