I got a memcpy function that look strange on how it was used. I pasted it below. Can someone please help explain it. I do not know why the (void *). buffer is buffer in struct BLK. Thanks.
memcpy(
(void *) (BLK->buffer + left),
(void *) input,
fill
);
There is no need for the cast, assuming
inputandBLK->bufferare already pointer types (which they really should be).I can think of two reasons why they’re there: