Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!ucdavis!csusac! From: hoodr@syscube.csus.edu (Robert Hood) Newsgroups: comp.sys.next Subject: Whats wrong? Message-ID: <1989Nov29.014513.21386@csusac.csus.edu> Date: 29 Nov 89 01:45:13 GMT Reply-To: hoodr@syscube.csus.edu (Robert Hood) Organization: California State University: Sacramento Lines: 30 I ran into a little problem. I have this piece of code that works on all the Unix boxes I could try, *EXCEPT* the NeXT: #include struct test { char *temp; int temp2; }; struct test demo = { "this are a test", 4}; main () { puts (demo.temp); *demo.temp = '*'; puts (demo.temp); } 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') ------------------------------------------------------------------------------- Robert Hood -- California State University: Sacramento INTERNET: hoodr@csus.edu BITNET: hoodr@CALSTATE UUCP: ...!ucdavis!cssexb!hoodr or ...!uunet!mmsac!csusac!cssexb!hoodr