摘要: 什么都不用说,通过一个样例看看吧. typedef struct{ int LinkID; int classnum; char name[20];}map; int comp1(const void *a,const void *b){ map *c=(map *)a; map *d=(map *)b; if(c->LinkID!=d->LinkID) return c-... 阅读全文
posted @ 2012-08-12 17:18 wmx3ng 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 样本程序如下: #include #include #include typedef struct{int ele1;int ele2;char ch[20];}ttt; //结构体. void addInfo(int *n){FILE *file=fopen("wmx.dat","w");int i=0;ttt myttt;for(i=0;i_flag 没有被置为_IOEOF,因为已经... 阅读全文
posted @ 2012-08-12 17:15 wmx3ng 阅读(7988) 评论(0) 推荐(0) 编辑