🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.learn.c-c++
Article #480

Re: Sharing a variable through my project in BC++ 5.02

#480
From: Jimmy Shoe
Date: Mon, 02 Feb 1998 00:00
16 lines
1247 bytes

Trenton D. Adams wrote in message ...
>My question now is this.  How the heck do I make a variable that will
>keep it's value through my whole program?  I thought this would be very
>simple to figure out but nothing seems to work.

It is easy.  Just make the variable global.  Declare it outside of a
function.  If you want to use it in another file declare it again, but use
the word "extern" in front of it.

________________________________________
Dan Markham
Game Programmer
batstone@megsinet.net
"It's Billy Shatner on the airplane wing"
Technical Details
Message-ID: <6b3ojq$k1b$1@news.megsinet.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <MPG.f3f021a49d3df279896a3@news.edmonton.telusplanet.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f8d38,cc5639ecc55682f1
X-Google-Attributes: gidf8d38,public
X-Google-Thread: 114592,cc5639ecc55682f1
X-Google-Attributes: gid114592,public
X-Google-Thread: 109fba,cc5639ecc55682f1
X-Google-Attributes: gid109fba,public
From: "Jimmy Shoe" <batstone@megsinet.net>
Subject: Re: Sharing a variable through my project in BC++ 5.02
Date: 1998/02/02
Message-ID: <6b3ojq$k1b$1@news.megsinet.net>
X-Deja-AN: 321273633
References: <MPG.f3f021a49d3df279896a3@news.edmonton.telusplanet.net>
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Newsgroups: alt.comp.lang.learn.c-c++,borland.public.cpp.language,comp.lang.c++