Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!uccba!spca6!kgw2!dennisg From: dennisg@kgw2.UUCP (Dennis Glatting) Newsgroups: comp.sys.next Subject: Re: Whats wrong? Summary: standard problem Message-ID: <124@kgw2.UUCP> Date: 29 Nov 89 12:52:41 GMT References: <1989Nov29.014513.21386@csusac.csus.edu> Organization: Xetron Corp, Cincinnati Ohio Lines: 27 In article <1989Nov29.014513.21386@csusac.csus.edu>, hoodr@syscube.csus.edu (Robert Hood) writes: > > Its a very simple piece of code that replaces the first character with an > '*'. It produces: > > this are a test > Bus error > > Why? Am I missing a compiler option somewhere? (I just used 'cc test.c') > that doesn't supprise me. your string is probably const data. which means its in a memory segment that can't be written to. if i remember correctly there is a switch on the compiler that says to make strings writable. ==+==+==+==+==+==+==+==+==+==+==+==+==+== ..umbc3.umbc.edu!tron!kgw2!dennisg + Dennis P. Glatting + Xetron Corporation + Cincinnati, Ohio + I want my own NeXT, 16 MB RAM, + 660 MB SCSI, NeXT Printer. + Accepting Donations. ==+==+==+==+==+==+==+==+==+==+==+==+==+==