#include <stdio.h>
#include <malloc.h>

typedef void *VPointer;

int main()
{
	VPointer q = malloc(sizeof(int));
	int *p = (int *)q;
	*p = 10;
	printf("%d\n", *p);

	return 0;
}

 

      在x264中,看到了一些void * 类型的指针,实际上就相当于泛型指针,不可以进行*pointer操作.  程序中采用空指针,是为了声明变量的简便和统一.


本文转载:CSDN博客