[LCP]sizeof question.
    A 
    inbox at andy.co.uk
       
    Sat Sep 21 01:49:01 UTC 2002
    
    
  
On Friday 20 September 2002 2:48 pm, you wrote:
#
# I added the case because the compiler complains if I don't.
# SUN Workshop, not gcc :(, unfortunaltly.
#
That is most likely because you have missed out 
    #include<stdlib.h>
which includes the prototype for the malloc family. With this missed out the 
compiler assumes that the return type will be int and therfore requires the 
cast. This is the kind of error that gets masked with casts.
----A
    
    
More information about the linuxCprogramming
mailing list