From: mdruiter AT cs DOT vu DOT nl (Ruiter de M) Newsgroups: comp.os.msdos.djgpp Subject: Re: why don't this work Date: 17 Mar 1998 13:12:10 GMT Organization: Fac. Wiskunde & Informatica, VU, Amsterdam Lines: 24 Message-ID: <6elsra$ghc$1@star.cs.vu.nl> References: <199803140124 DOT RAA06141 AT adit DOT ap DOT net> NNTP-Posting-Host: sloep53.cs.vu.nl To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Nate Eldredge (eldredge AT ap DOT net) wrote: > At 05:17 3/12/1998 GMT, A. Jans-Beken wrote: > >shifter wrote: > >> char *password; > >OOPS----^^^^^^^^ > >password is a pointer but points to nothing. > >char *password = "xxxxxxxxxxxxxxxxxx"; works... > No it won't! You may get away with it on DJGPP, I even doubt that, but haven't checked it. > but on most systems a string constant will be read-only. Setting a > pointer to point to a constant and then writing into it will get you > only a nice message saying "Segmentation fault". So, change it to: char password[] = "xxxxxxxxxxxxxxxxxx"; -- Groeten, Michel. http://www.cs.vu.nl/~mdruiter \----/==\----/ \ / \ / "You know, Beavis, you need things that suck, \/ \/ to have things that are cool", Butt-Head.