Mail Archives: djgpp/1998/04/26/23:30:29
At 09:44 4/26/1998 +0200, leger_v AT bluewin DOT ch wrote:
>Than a lot. I couldn't continue my program without the malloc(long)
>function. I believed that the (unsigned long *) provided a long
>allocation but I got wrong.
`malloc' has no way of knowing what type you are going to store in the
memory, and the (unsigned long *) bit is just a cast (for more info on which
see a C book).
Incidentally, you should also check in each case whether `malloc' returns
NULL, because you don't really know how much memory is available. It might
be less than (64K * 4 * 10).
Nate Eldredge
nate AT cartsys DOT com
- Raw text -