
- Forum
- Programming Talk
- C and C++
- Casting can be Done or Not
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....
-
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.
-
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.
«
Memory Error
|
Pointer Types
»

Reply With Quote





