From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: environment variables Date: Wed, 11 Jun 1997 23:53:08 +0000 Organization: Two pounds of chaos and a pinch of salt Message-ID: <339F3A64.5551@cs.com> References: <01IJYIJ9NKOI8ZPIWK AT NICKEL DOT LAURENTIAN DOT CA> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp214.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 18 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk S2200253 AT nickel DOT laurentian DOT ca wrote: > > How do you determine in C or C++ what the environment variables > are set to. I think there is another varible in > > main(int argc, char *argv[], /*something here*/) There may well be (in fact, I think there is), but it's a nonstandard way to get the environment. The standard interface is through the getenv() and putenv() functions; look them up in the libc docs for more info. -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | mailto:fighteer AT cs DOT com | | Proud owner of what might one | http://www.cs.com/fighteer | | day be a spectacular MUD... | Plan: To make Bill Gates suffer | ---------------------------------------------------------------------