0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
The major difference is what is told in the MSDN
Quote:
Originally Posted by MSDN
calloc calls malloc in order to use the C++ _set_new_mode function to set the new handler mode. The new handler mode indicates whether, on failure, malloc is to call the new handler routine as set by _set_new_handler. By default, malloc does not call the new handler routine on failure to allocate memory. You can override this default behavior so that, when calloc fails to allocate memory, malloc calls the new handler routine in the same way that the new operator does when it fails for the same reason. To override the default, call
0
Peter_APIIT's Avatar, Join Date: Apr 2007
Contributor
Is it compulsory or a must to cast the return value to a specify data type ?

Thanks for your explanation.
0
DaWei's Avatar, Join Date: Dec 2006
Team Leader
Ummmmm, read post #2?
0
Peter_APIIT's Avatar, Join Date: Apr 2007
Contributor
I have read the post but i don't understand because of my poor english. I am a Malaysian.

Thanks for oyur patient and help.

Your help is greatly appreciated by me and others.