Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!hsdndev!bbn.com!nic!chaos.cs.brandeis.edu!chaos.cs.brandeis.edu!phils From: phils@chaos.cs.brandeis.edu (Phil Shapiro) Newsgroups: comp.sys.mac.programmer Subject: Re: malloc() Help Message-ID: Date: 7 Feb 91 15:40:09 GMT References: <15828@milton.u.washington.edu> <7442@crash.cts.com> Sender: @chaos.cs.brandeis.edu Organization: Symantec Corp. Lines: 22 In-Reply-To: kevin@crash.cts.com's message of 6 Feb 91 15:39:43 GMT In article <7442@crash.cts.com> kevin@crash.cts.com (Kevin Hill) writes: In <15828@milton.u.washington.edu> bose@milton.u.washington.edu (Rob Olsen) writes: >For some reason, I have trouble using malloc() in THINK C. >Here is an example: >doit(num) >int num; >{ > char *back; > back=malloc(num); >} Try including In your file #include & #include This solution applies only to verion 3.0x of THINK C. In the newer version (v4.0x) you will want to #include . The names were changed to provide better ANSI conformance. -phil -- Phil Shapiro Technical Support Analyst Language Products Group Symantec Corporation Internet: phils@chaos.cs.brandeis.edu