Mail Archives: djgpp/1998/03/17/09:15:20
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.
- Raw text -