Thread
:
values being overwritten?
View Single Post
DaWei
Team Leader
4Feb2007,00:25
Malloc has no idea what you want the memory for. It simply allots you the number of bytes that you asked for. You can memset that same number of bytes. You may also use calloc, which initializes the bytes to zero.