When to use a void pointer?

后端 未结 13 2018
北荒
北荒 2020-12-07 17:33

I understand the use of void pointer for malloc implementation.

void* malloc  ( size_t size );

Can anyone suggest other reasons or provide

13条回答
  •  醉酒成梦
    2020-12-07 18:18

    int (*f) (void);
    f =(void*) getprocaddress(dll,"myfunction");
    

    to make the compiler happy

提交回复
热议问题