Xref: utzoo comp.lang.c:35149 comp.os.msdos.programmer:2784 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!think.com!sdd.hp.com!wuarchive!emory!gatech!mcnc!ncsuvx!ncsugn!emigh From: emigh@ncsugn.ncsu.edu (Ted H. Emigh) Newsgroups: comp.lang.c,comp.os.msdos.programmer Subject: Re: Problem with TURBO C and pointers Message-ID: <6093@ncsugn.ncsu.edu> Date: 10 Jan 91 19:27:43 GMT References: <1991Jan9.012509.22427@lingua.cltr.uq.OZ.AU> Reply-To: emigh@ncsugn.UUCP (Ted H. Emigh) Organization: North Carolina State University, Department of Genetics Lines: 17 In article <1991Jan9.012509.22427@lingua.cltr.uq.OZ.AU> jcl@lingua.cltr.uq.OZ.AU (Jean-Claude Lacherez) writes: >Thanks to all those who replied to my question concerning dynamic >dimensioning of arrays. Unfortunately the problem is not solved: The copy of his program follows: > #include > > #define NB_OF_ROWS 5 > #define ROW_LENGTH 4 The problem is that he does not #include . For the small model, the pointer size is the same as the integer size. For the large model, the pointer size is larger than the integer size, but without the prototype it will stuff the result of the malloc into an integer. Moral: Turn on all the checking features of TC (or Zortech or MSC or ..). This would have been flagged immediately.