Exforsys
+ Reply to Thread
Results 1 to 2 of 2

Casting can be Done or Not

This is a discussion on Casting can be Done or Not within the C and C++ forums, part of the Programming Talk category; Can I cast a malloc's return value? If I do that what will happen? Someone provide insight on this....

  1. #1
    Ralph is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    114

    Casting can be Done or Not

    Can I cast a malloc's return value? If I do that what will happen? Someone provide insight on this.


  2. #2
    Angela is offline Member Array
    Join Date
    Apr 2006
    Answers
    85
    It is not wise and good to cast malloc's return value. It can even hide compiler warnings in some cases. No standard C programmer would do this. So don’t try to cast a malloc's return value.


Latest Article

Network Security Risk Assessment and Measurement

Read More...