void *:万能指针

实例

#include <string.h>
#include <stdio.h>

int main () {
   void * p;
   int a = 10;
   p = &a;
   printf("%d\n", *((int *)p));

   return(0);
}

 

posted @ 2019-12-05 21:27  xd_xumaomao  阅读(342)  评论(0编辑  收藏  举报