casting malloc question. 
Author Message
 casting malloc question.

Quote:

> My compiler requires the inclusion of both malloc.h and stdlib.h for malloc
> to be in scope. I had included <malloc.h> because my compiler's help file has
> this
> statement:

> malloc
> Allocates memory blocks.

> void *malloc( size_t size );

> Routine
> malloc

> Required Header
> <stdlib.h> and <malloc.h>

The <malloc.h> is not a standard header file. Try to compile with <stdlib.h>
only. This is enough.More over, my help contains the following for malloc():

#include<stdlib.h> or #include<alloc.h>

and not and as in your one.



Thu, 04 Oct 2001 03:00:00 GMT  
 casting malloc question.

Quote:
>The <malloc.h> is not a standard header file. Try to compile with <stdlib.h>
>only. This is enough.More over, my help contains the following for malloc():

>#include<stdlib.h> or #include<alloc.h>

>and not and as in your one.

<alloc.h> isn't standard, either.

--
{ Sunil Rao }
"Is there any light more becoming than that, low and richly tinted, that comes
subdued through the mists of sunshine?"
        -- J Sheridan Le Fanu



Thu, 04 Oct 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. casting malloc question.

2. malloc: to cast or not to cast

3. C question : redefining a new malloc() calling standard malloc()

4. to malloc() or not to malloc(), that is the question

5. never cast malloc?

6. casting return value from malloc

7. type casting malloc() to void *

8. cast to malloc

9. Why not cast the rerurn from malloc()?

10. More about casting malloc()...

11. About casting malloc()...

12. Type casting malloc??

 

 
Powered by phpBB® Forum Software