swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Circular ".h" files


From: Norberto Eiji Nawa
Subject: Re: Circular ".h" files
Date: Mon, 12 Jul 1999 08:59:19 +0900

Hello Doug,

I found this in the Apple's Objective C documentation
(http://developer.apple.com/techpubs/macosxserver/ObjectiveC/index.html):

"PREPROCESSOR DIRECTIVES

  The preprocessor understands these new notations:
  

Notation and Definition

  #import

       
     Imports a header file. This directive is identical to #include,
except that it won't include the same file more than once."

So using "#import <myheader.h>" instead of "#include <myheader.h>"
should avoid circular references.

Hope it is a useful piece of information.

Eiji

donalson> In C++ there is a way to avoid the problems with circular ".h" file
donalson> references by using
donalson> #ifndef LISTMEMBER_H
donalson> #define LISTMEMBER_H
donalson> //contents of .h file here
donalson> #endif
donalson> Is there any similar method in ObjC?
donalson> Cheers,
donalson>    D3

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]