cstdiofile file
while(file.readstring(buff,128))
{
......
}
我读到file的最后了,下次怎么重新开始从头读,不想再OPEN一次了,谢谢
while(file.readstring(buff,128))
{
......
}
我读到file的最后了,下次怎么重新开始从头读,不想再OPEN一次了,谢谢
解决方案 »
- 请教串口控制modem问题
- 用全局变量替代局部变量是否可以大幅度提高运行速度?
- 请教一个PostMessage()向View视图中传递字符串的问题
- 求高性能网络服务程序!
- 用ADO远程联SQL2000,在本机执行程序没问题(本机装有SQL2000客户端),换在其他机器执行就报错???
- 关于查看“*”显示密码的方法!!!!!
- U盘容量鉴定(识别扩容U盘)的原理及方法是什么,如何实现?
- 服务程序,服务类在Main里面是如何运行的,具体流程是怎样的?
- 请教winzip如何解密?多谢(无正文)
- 我刚学vc ,请问有没有关于钩子函数的完整的MFC的例子?急用,谢谢了
- ListCtrl为什么无法显示位图?
- C++ 设置文件流的编码格式
LONGLONG lOff,
UINT nFrom
);Parameters
lOff
Number of bytes to move the pointer. nFrom
Pointer movement mode. Must be one of the following values: CFile::begin: Move the file pointer lOff bytes forward from the beginning of the file. CFile::current: Move the file pointer lOff bytes from the current position in the file. CFile::end: Move the file pointer lOff bytes from the end of the file. Note that lOff must be negative to seek into the existing file; positive values will seek past the end of the file.
CStdioFile cfile(_T("Stdio_Seek_File.dat"), CFile::modeWrite |
CFile::modeCreate);
LONGLONG lOff = 1000;
ULONGLONG lActual = cfile.Seek(lOff, CFile::begin);
用seek来指向头
cstdiofile file;
file.Seek(0,CFile::begin);