Path: utzoo!censor!geac!torsqnt!jarvis.csri.toronto.edu!mailrus!umich!yale!think!zaphod.mps.ohio-state.edu!mips!apple!well!oster From: oster@well.sf.ca.us (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Think C programming Message-ID: <16614@well.sf.ca.us> Date: 11 Mar 90 12:46:40 GMT References: <2967@dciem.dciem.dnd.ca> <1007@dms.UUCP> Reply-To: oster@well.UUCP (David Phillip Oster) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 22 In article <1007@dms.UUCP> rotberg@dms.UUCP (Ed Rotberg) writes: >From article <2967@dciem.dciem.dnd.ca>, by juana@dciem.dciem.dnd.ca (Juana Chang): >> GetIText( &hdl_item, str_item ); >> Why am I getting GARBAGE?? > > GetIText( hdl_item, &str_item ); > >Note the ampersand (&) before str_item, and none before the handle. This entire class of problems can be permanently eliminated from your THINK C program by re-making your MacHeaders file to include MacProtos.h and MacProtos5.h. These two files contain complete prototypes for almost all the operating system calls, and cause the compiler to give you an error message when you make this kind of mistake. I, and others, have previously posted MacProtos.h and MacProtos5.h to the net, and any good library or users group should have them. Use them. You'll get done faster. -- -- David Phillip Oster - Note new address. Old one has gone Bye Bye. -- oster@well.sf.ca.us = {backbone}!well!oster