Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!hp4nl!let.rug.nl!eoo From: eoo@let.rug.nl (Eize Oosting) Newsgroups: comp.sys.amiga.programmer Subject: Re: RE: HEEELLLPPPPPP!!!!! Message-ID: <1740@gufalet.let.rug.nl> Date: 10 Jun 91 00:23:24 GMT References: <9106060516.AA18295@bruny.cc.utas.edu.au> Organization: Faculty of Arts, Groningen, The Netherlands Lines: 39 In article <9106060516.AA18295@bruny.cc.utas.edu.au> u895762@BRUNY.CC.UTAS.EDU.AU (Pavel Evgenjevich Sabourenkov) writes: > > Thanks everybody who send me some suggestions. I really appreciate it. > > The bug was in the manx itself - it did not know what type of variable >malloc() returns, so it assumes it's an int, although the user manual says >it should return (char *). > No, the BUG was in YOUR program. Although the user manual says that malloc() returns a char *, it also says that you should include to let the compiler know too, because the compiler does NOT know the user manual (this last qoute is not my own inspirition, but someone else's). By the way, malloc() returns a void *, not a char *. > There is an easy way to fix it - include > >char *malloc(); > > in the begining of the program. > No, #include in the beginning of your program. >-Happy programming. > Correct programming!!!! /\__________/\ /\___________________________________________________/\ / \ / \ | Letteren- | Marvin Minsky once defined Artificial Intelligence as: | | Faculteit | '... the science of making machines do things that | | R.U. Groningen | would require intelligence if done by men'. | | The Netherlands| | | | Does this include adding a device to the Mountlist? | | eoo@let.rug.nl | Eize Oosting | \ __________ / \ ___________________________________________________ / \/ \/ \/ \/