//指向 int 值的指针int *pInt = malloc(sizeof(int));*pInt = 50;//指向 double 的指针double *pDouble = malloc(sizeof(double));double d = 3.14;*pDouble = d;//内存释放free(pInt);free(pDouble);