摘要: 1 //自己写的! 2 3 #include 4 5 using namespace std; 6 7 8 typedef struct _DATA_ 9 { 10 11 char szName[20]; 12 int iAge; 13 }Data,*pData; 14 15 typedef struct _NODE_ 16 { 17 Data DataTemp; 18 _NODE_* pNext; 19 }Node,*pNode; 20 21 22 class CList 23 { 24 public: 25 CLi... 阅读全文
posted @ 2013-10-06 21:26 Geekers 阅读(779) 评论(0) 推荐(0) 编辑
摘要: 通常文件打开后,读写位置按先后顺序.但有时你想变动读写位置,例如重新从某处起,再读一次.int fseek(FILE *stream, long offset, int fromwhere);fseek 用于二进制方式打开的文件,移动文件读写指针位置.fseek(in,-1L,1); -- 文件流in, 零点为当前指针位置,SEEK_CUR 就是 1, -1L -- 文件指针回退1个字节int fseek( FILE *stream, long offset, int origin ); 第一个参数stream为文件指针 第二个参数offset为偏移量,整数表示正向偏移,负数表示负向... 阅读全文
posted @ 2013-10-06 20:59 Geekers 阅读(1898) 评论(0) 推荐(0) 编辑