Newsgroups: comp.sys.mac.programmer Path: utzoo!utgpu!watserv1!watdragon!lion!jlee4 From: jlee4@lion.uwaterloo.ca (Johnny Lee) Subject: Re: CtoPstr Message-ID: <1990Dec13.195336.15562@watdragon.waterloo.edu> Sender: daemon@watdragon.waterloo.edu (Owner of Many System Processes) Organization: University of Waterloo References: <18153@shlump.nac.dec.com> Date: Thu, 13 Dec 90 19:53:36 GMT Lines: 22 In article <18153@shlump.nac.dec.com> vandevyver@cuvee.enet.dec.com writes: > >>[rg2c+@andrew.cmu.edu (Robert Nelson Gasch) writes:] >>[] Could anybody out there please tell me what exactly the function >>[] prototype for CtoPstr looks like? When I call it using >>[] >>[] CtoPstr (&temp); >>[] >>[] where temp is of type Str255. I get the error "Call does not match > >just declare the string as a normal c string, but, make it big enough (at leat >1 bigger than needed. Huh?! He doesn't need to change the type of temp. If you've got a C string in temp, then all you need to do is cast it to a char * (since I expect the prototype is CtoPStr(char *);, actually I think it's "char *CtoPStr(char *);" ). You just need to have enough room for the C string, since the Pascal string will use the same amount of room as the C string. Johnny