Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!mimsy!mojo!russotto From: russotto@eng.umd.edu (Matthew T. Russotto) Newsgroups: comp.sys.mac.programmer Subject: Re: MPW C 3.0 question Message-ID: <1990Feb16.151947.15346@eng.umd.edu> Date: 16 Feb 90 15:19:47 GMT References: <152.25dc364d@waikato.ac.nz> Sender: news@eng.umd.edu (The News System) Organization: Maryversity of Uniland, College Park Lines: 31 In article <152.25dc364d@waikato.ac.nz> ccc_ldo@waikato.ac.nz writes: >Can anybody tell me why the following program throws up an error with >MPW C 3.0? > > typedef unsigned char > Str255[256]; > > main() > { > Str255 > temps, *tempp; > > tempp = &temps; > } > >Here's the error report: > ># ># tempp = &temps; ># ? >### Error 225 Incompatible types for assignment >#-------------------------------------------------------------------------------------------------------------------------------- > File "test.c"; Line 9 >#-------------------------------------------------------------------------------------------------------------------------------- tempp is a pointer variable. temps is a pointer CONSTANT. By asking for a pointer to a pointer constant, you are making a nonsense request (though most C's will ignore it and the '&', and MegaMax REQUIRED the '&') Try tempp=temps; -- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu ][, ][+, ///, ///+, //e, //c, IIGS, //c+ --- Any questions?