头文件:#include
char *ptr = (char *)malloc(10); // 分配10个字节的内存空间,用来存放字符
malloc()最初始是void* 就是啥都没有 可以根据需要把它定义成char* 或者int*或者struct node * 都可以。