Re: Reading a string of unknown size



Sundar wrote:

.... snip ...

Can u please further explain the following statement....

"Don't cast return value of malloc() in C. It can hide the
non-inclusion of it's prototype, (by way of failure to include
stdlib.h), and, on some implementations, can result in nasty
crashes during runtime."

I am unable to understand the intricacies of the above statement.

It's in the FAQ. Don't use silly abbreviations such as 'u'.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>


.



Relevant Pages