delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/02/17:17:36

From: Ryan McGee <rdm AT IHateSpam DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: extern problem
Date: Fri, 02 Jan 1998 15:52:56 -0600
Organization: InLink
Lines: 14
Message-ID: <34AD61B8.8C4CF871@IHateSpam.com>
NNTP-Posting-Host: iits0137.inlink.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I'm having a problem with the extern keyword.  I'm doing a multi-file
project in RHIDE, and I'm declaring something I want all the functions
to be able to acess above my main and then in the other files declairing
it the same way with the extern keyword before it.  The problem is that
the variables are all equal to 0 when I use extern, but they have values
in them in main. Can anyone tell me what I'm doing wrong.  Here's an
example of what I'm doing:

extern Sprite sprite;                        //sprite being a tydefined
structure

Ryan
rdm AT inlink DOT com

- Raw text -


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