From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: Problems Linking Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: <47fnns4b5asagf1287kg9bvsnlpojcftqb@4ax.com> References: <397bb60a_3 AT spamkiller DOT newsfeeds DOT com> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 30 X-Trace: /ba9QYBnzbl3l0FZxGSGU1mDh+p6mt/5UYZXgyHPp/2QjDoIzPi522cY+rycxJzB4GPFym5ctivT!PFXBMVhJZxbvbSxzkfsQzsLLLbB2UkCe/iokYLNPdkYa5c9q0LKGX7J7yhJfJFJI/9rjuoOQbRm2!ic4= X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Mon, 24 Jul 2000 03:49:15 GMT Distribution: world Date: Mon, 24 Jul 2000 03:49:15 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Fri, 21 Jul 2000 17:40:27 -0500, "23yrold3yrold" wrote: >Hello. I'm trying to write a game across a few .CPP files, with global >variables and function prototypes residing in an .H file. If I #include the >.H file in one .CPP, the others give "undeclared identifier"errors, and if I >#include in all of them, it gives "multiple declaration" errors. All of >which I can understand; I just want to find a way to get it all to work >together. Thanks muchly in advance. > Whenever you write a .h file, do this to stop multiple declaration errors: // foo.h #ifndef FOO_H #define FOO_H // contents of header file #endif -- Damian Yerrick "I refuse to listen to those who refuse to listen to reason." See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/