不正确 void*的指针不能做解引用操作
想下面这样写是对的
程序代码:
想下面这样写是对的

int c = 1; int *b=&c; //1直接初始化指针变量 表示指向地址为1的内存 *(int*)a=*b; //无类型质指针使用前需要转换为具体类型 printf("a=%d\n", *(int*)a);

人生是一场错过 愿你别蹉跎