一无所有是一种财富,它让穷人产生改变命运的行动。
本讲内容:RandomAccessFile
RandomAccessFile是用来访问那些保存数据记录的文件的,你就可以用seek( )方法来访问记录,并进行读写了。这些记录的大小不必相同;但是其大小和位置必须是可知的。但是该类仅限于操作文件。
RandomAccessFile不属于InputStream和OutputSt...
分类:
其他好文 时间:
2015-01-25 13:57:38
阅读次数:
257
#include //蜘蛛纸牌存档文件,读取分数。int main(void){ FILE *rfile; int p[20]; rfile = fopen("d:\\spider.sav","rb+");//只能用rb+,不能用wb fseek(rfile,368,SEEK_SET);//36.....
分类:
其他好文 时间:
2015-01-18 17:00:00
阅读次数:
128
#include //蜘蛛纸牌存档文件,修改分数。int main(void){ FILE *wfile; int n = 655320; wfile = fopen("d:\\spider.sav","rb+");//只能用rb+,不能用wb fseek(wfile,368,SEEK_SET);....
分类:
其他好文 时间:
2015-01-18 14:21:26
阅读次数:
183
来源:http://blog.csdn.net/mu399/article/details/5818970这篇教程例子中的程序,让右方向按键为快进10秒,上方向按键为快进60秒,左方向按键为快退10秒,上方向按键为快退60秒,程序中的 av_seek_frame函数可能是用错了,或者函数本身的问题导...
分类:
其他好文 时间:
2014-12-30 14:51:07
阅读次数:
291
实际读取图片的代码已经上传到我的资源里面; 下面贴出使用例子:
unsigned char* esLoadJPG(const char *fileName, int *width, int *height, int *size)
{
FILE *f = fopen(fileName, "rb");
fseek(f, 0, SEEK_END);
*size ...
分类:
系统相关 时间:
2014-12-30 11:41:37
阅读次数:
276
题目大意:给出平面上n个点,一个点离所有点的最长距离和最短距离的差最小,求这个最小的差。
思路:50W的数据为何O(nsqrt(n))的暴力能过???
CODE:
#include
#include
#include
#include
#define MAX 500010
#define INF 0x3f3f3f3f
using namespace std;
#d...
分类:
其他好文 时间:
2014-12-25 22:14:42
阅读次数:
280
注意细节边界的时候 容易忽略错误 在除给定的例子之外 想一个特殊符合题意的特殊例子。#include#include#includeusing namespace std;void GetFail(int *f,char* P){ int m=strlen(P); f[0]=f[1]=0...
分类:
其他好文 时间:
2014-12-24 20:08:34
阅读次数:
143
DescriptionThe little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-...
分类:
其他好文 时间:
2014-12-14 21:10:37
阅读次数:
216
有关逐行写入的在这里下面是关于逐行读取fn maxfilelog finpath =( fin = openfile finpath seek fin #eof maxlen=filepos fin seek fin 0 res = readChars fin maxl...
分类:
编程语言 时间:
2014-12-08 00:42:28
阅读次数:
294