Quote:
Originally Posted by Aztec
NO, It's not a good practise at all.
You don't need to cast result of malloc in C. Sometimes people do it to maintain compatibility between C and C++ code but then again there are very less situations when you will use malloc in C++.
Why you think its not a good practice. If you dont type cast it then compiler will do that for you and its always better to be doing it yourself rather than leave it upto the compilers.