文件名称:aj
介绍说明--下载内容来自于网络,使用问题请自行百度
本例中,定义了结构stu,定义了stu类型指针变量ps。然后分配一块stu大内存区,并把首地址赋予ps,使ps指向该区域。再以ps为指向结构的指针变量对各成员赋值,并用printf输出各成员值。最后用free函数释放ps指向的内存空间。整个程序包含了申请内存空间、使用内存空间、释放内存空间三个步骤,实现存储空间的动态分配。-This case, the definition of the structure of stu, the definition of a pointer variable stu type ps. Stu and then the distribution of a large memory area, and the first address given to ps, so that point to the region ps. Ps and then the pointer to point to structure member variables of the assignment, and the members of printf output value. Free function with the release of the final point of the memory space ps. The whole process includes an application memory space, the use of memory space, a three-step release of memory space and realize the dynamic allocation of storage space.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
aj.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.