memcpy function is used for copy to dst from src with size:
If msg structure was defined as follow:Code:memcpy(dst, src, size)
and buf defined as follow:Code:struct msg{ char data[100]; int dsize; }
Now if i run below command:Code:struct buf{ char *data; int len; }
Does copy buf->data to msg->data? If yes, what is effect of msg->dsize?Code:memcpy(msg->data+msg->dsize, buf->data, buf->len)
I saw this in a C project.