Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: C error which worked fine Message-ID: <1989Feb9.234905.21625@utzoo.uucp> Organization: U of Toronto Zoology References: <7631@techunix.BITNET> Date: Thu, 9 Feb 89 23:49:05 GMT In article <7631@techunix.BITNET> ssreefc@techunix.BITNET (florin coter) writes: >the undeclared fopen sould have been assumed of type int and not FILE *... >so why did it work ok? First, are you sure you didn't include , which declares those things? Second, in many (not all!) C implementations, pointers and ints are the same size and are handled much the same way, so you can sometimes get away with lying to the compiler about the type of returned values, because it treats them the same way regardless. -- The Earth is our mother; | Henry Spencer at U of Toronto Zoology our nine months are up. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu