Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: "Mark Swaanenburg" <spam0@@@eg.homeip.net>
Subject: Re: segfault and gcc-2.96
Date: Tue, 5 Nov 2002 08:31:29 +0100	[thread overview]
Message-ID: <aq7s4h$ko3$1@news.tudelft.nl> (raw)
In-Reply-To: 878z08vonz.fsf@student.uni-tuebingen.de


"Falk Hueffner" <falk.hueffner@student.uni-tuebingen.de> wrote in message
news:878z08vonz.fsf@student.uni-tuebingen.de...
> JMK <jeffrey.m.klopotic@lmco.nospam.com> writes:
>
> > char *f1 = "default.str";
> > ...
> > strcpy (f1, pfix); <-------- Program received signal SIGSEGV,
>
> String literals are not writable. They are of type const char*.
>
> --
> Falk

I would try it this way:

char f1[ ] = {"default.str"};

I guess this would just create an 12 byte array which is writeable.

Mark




  reply	other threads:[~2002-11-05  7:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <apqobk$ocj$1@news.tudelft.nl>
     [not found] ` <3DC324DA.4C495AEC@lmco.nospam.com>
     [not found]   ` <EzMw9.1438$hf.102567@castor.casema.net>
2002-11-04 23:32     ` segfault and gcc-2.96 JMK
2002-11-05  0:35       ` Ulrich Weigand
2002-11-05  0:35       ` Falk Hueffner
2002-11-05  7:31         ` Mark Swaanenburg [this message]
2002-11-06  4:40         ` Kevin Easton
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox