设为首页 加入收藏

TOP

※C++随笔※=>☆C++基础☆=>※№ C++文件操作 (fstream)(十)
2015-11-21 01:15:20 来源: 作者: 【 】 浏览:23
Tags:随笔 > 基础 文件 操作 fstream
eekg(DWORD dwSeek) ?
{ ?
? ? if (NULL == m_pfstream) { ?
? ? ? ? return; ?
? ? } ?
? ? m_pfstream->seekg(dwSeek); ?
} ?
??
/**?
* Seekg Relatively move (Reading and writing binary files)?
*?
* @param ? ? ? ? DWORD dwSeek relatively move position?
* @param ? ? ? ? FILE_REFERENCE_POS eFileRefPos file reference position?
? ? ? ? ? ? ? ? ? ? FILE_REFERENCE_POS_BEG = std::ios :: beg, ? // 0: relative to the file header?
? ? ? ? ? ? ? ? ? ? FILE_REFERENCE_POS_CUR = std::ios :: cur, ? // 1: relative to the current position?
? ? ? ? ? ? ? ? ? ? FILE_REFERENCE_POS_END = std::ios :: end, ? // 2: relative to the end of the file?
* @return VOID?
* @note?
* @attention ? ?Input stream operation?
*/ ?
VOID ??
AL_File::Seekg(DWORD dwSeek, FILE_REFERENCE_POS eFileRefPos) ?
{ ?
? ? if (NULL == m_pfstream) { ?
? ? ? ? return; ?
? ? } ?
? ? m_pfstream->seekg(dwSeek, eFileRefPos); ?
} ?
??
/**?
* Tellg Returns the current pointer position (Reading and writing binary files)?
*?
* @param VOID?
* @return VOID?
* @note?
* @attention ? ?Input stream operation?
*/ ?
VOID ??
AL_File::Tellg(VOID) ?
{ ?
? ? if (NULL == m_pfstream) { ?
? ? ? ? return; ?
? ? } ?
? ? m_pfstream->tellg(); ?
} ?
??
/**?
* Seekp Absolutely move (Reading and writing binary files)?
*?
* @param ? ? ? ? DWORD dwSeek absolute move position?
* @return VOID?
* @note?
* @attention ? ?Output stream operation?
*/ ?
VOID ??
AL_File::Seekp(DWORD dwSeek) ?
{ ?
? ? if (NULL == m_pfstream) { ?
? ? ? ? return; ?
? ? } ?
? ? m_pfstream->seekp(dwSeek); ?
} ?
??
/**?
* Seekp Relatively move (Reading and writing binary files)?
*?
* @param ? ? ? ? DWORD dwSeek relatively move position?
* @param ? ? ? ? FILE_REFERENCE_POS eFileRefPos file reference position?
? ? ? ? ? ? ? ? ? ? FILE_REFERENCE_POS_BEG = std::ios :: beg, ? // 0: relative to the file header?
? ? ? ? ? ? ? ? ? ? FILE_REFERENCE_POS_CUR = std::ios :: cur, ? // 1: relative to the current position?
? ? ? ? ? ? ? ? ? ? FILE_REFERENCE_POS_END = std::ios :: end, ? // 2: relative to the end of the file?
* @return VOID?
* @note?
* @attention ? ?Output stream operation?
*/ ?
VOID ??
AL_File::Seekp(DWORD dwSeek, FILE_REFERENCE_POS eFileRefPos) ?
{ ?
? ? if (NULL == m_pfstream) { ?
? ? ? ? return; ?
? ? } ?
? ? m_pfstream->seekp(dwSeek, eFileRefPos); ?
} ?
??
/**?
* Tellp Returns the current pointer position (Reading and writing binary files)?
*?
* @param VOID?
* @return VOID?
* @note?
* @attention ? ?Output stream operation?
*/ ?
VOID ??
AL_File::Tellp(VOID) ?
{ ?
? ? if (NULL == m_pfstream) { ?
? ? ? ? return; ?
? ? } ?
? ? m_pfstream->tellp(); ?
} ?
??
??
/////////////////////////////////////Close the file///////////////////////////////////// ?
/**?
* Close (Close the file)?
*?
* @param VOID?
* @return VOID?
* @note?
* @attention?
*/ ?
VOID ??
AL_File::Close(VOID) ?
{ ?
? ? if (NULL == m_pfstream) { ?
? ? ? ? return; ?
? ? } ?
? ? m_pfstream->close(); ?
} ?
??
/* EOF */ ?
?
? ? ? ? 附其它几篇相关文章:
? ? ? ? ? ? ? ? http://www.iteye.com/topic/383903
? ? ? ? ? ? ? ? http://blog.csdn.net/mak0000/article/details/3230199
? ? ?文件路径函数?
? ? ? ? ExpandFileName() 返回文件的全路径(含驱动器、路径)?
? ? ? ? ExtractFileExt() 从文件名中抽取扩展名?
? ? ? ? ExtractFileName() 从文件名中抽取不含路径的文件名?
? ? ? ? ExtractFilePath() 从文件名中抽取路径名?
? ? ? ? ExtractFileDir() 从文件
首页 上一页 7 8 9 10 11 下一页 尾页 10/11/11
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇POJ3006:Dirichlet's Theorem.. 下一篇字符串系列――10010 Where's..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: