摘要: // 分配内存空间.cpp : 定义控制台应用程序的入口点。//#include "stdio.h"#include "malloc.h"struct Student{ int id; char *name; int score; struct Student *next;};void errorFun(){ struct Student stu={1,"wq",99}; struct Student *head,*s1; for(int i=0;i3;i++) { //这一句,只在第一次执行的时候给s分配了内存地址,第一次以后执行都是用相同的内存地址,也就是说从第一次循环过后每次都是给同一 阅读全文
posted @ 2010-09-02 23:58 再快一点 阅读(4072) 评论(0) 推荐(0) 编辑