cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/01/09:56:32.2

From: "Floris van den Berg" <remu AT multiweb DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: multiple file compiling
Date: 1 Jan 1999 14:46:12 GMT
Organization: News Service (http://www.news-service.com/)
Lines: 19
Message-ID: <01be3596$150ea380$617e97c2@fvdberg.magenta.com>
References: <19990101025458 DOT 11224 DOT 00005570 AT ng37 DOT aol DOT com>
NNTP-Posting-Host: 194.151.126.97
X-Newsreader: Microsoft Internet News 4.70.1155
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

#include is a so called preprocessor statement. This means that during
compiletime all include files will be copied together in one big file. The
compiler starts compiling that big file afterwards. There's no need to
share variables.

Floris

> Hello, Im trying to make a game.  This game is pretty long, so I have
decided
> to chop the program into different parts.  and have these different parts
of
> the game in their own file.  The only problem is how do I do the sharing
of
> variables.
> Say I declare the variable ROOM in the main file and also use it in the
second
> file. How do I take care of this?  Do I include the second file?
(#include
> <second.cpp>) 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019