※C++随笔※=>☆C++基础☆=>※№ C++文件操作 (fstream)(五)

2014-11-24 07:22:03 · 作者: · 浏览: 2
d 127 characters.
* @attention
*/
VOID Get(NCHAR* pStr, DWORD dwGetNum, NCHAR chEndChar);
/**
* Read (Reading and writing binary files)
*
* @param NCHAR* buf
* @param DWORD dwNum
* @return BOOL
* @note Prototype: read (unsigned char * buf, int num); read () num characters to read from the file
cache buf points to the end of the file has not been read into the num characters can use member
functionsint gcount (); to get the actual number of characters read
* @attention
*/
VOID Read(NCHAR* buf, DWORD dwNum);
/**
* Write (Reading and writing binary files)
*
* @param NCHAR* buf
* @param DWORD dwNum
* @return BOOL
* @note Prototype: write (const unsigned char * buf, int num); write () from buf points to the cache
write num characters to the file, it is noteworthy cache type is unsigned char *, may sometimes
be necessary type conversion.
* @attention
*/
VOID Write(const NCHAR* buf, DWORD dwNum);
/**
* Eof End of file is read (Reading and writing binary files)
*
* @param VOID
* @return BOOL
* @note
* @attention
*/
BOOL Eof(VOID);
/**
* Gcount The actual number of bytes read (Reading and writing binary files)
*
* @param VOID
* @return DWORD
* @note
* @attention
*/
DWORD Gcount(VOID);
/**
* Seekg Absolutely move (Reading and writing binary files)
*
* @param DWORD dwSeek absolute move position
* @return VOID
* @note
* @attention Input stream operation
*/
VOID Seekg(DWORD 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 Seekg(DWORD dwSeek, FILE_REFERENCE_POS eFileRefPos);
/**
* Tellg Returns the current pointer position (Reading and writing binary files)
*
* @param VOID
* @return VOID
* @note
* @attention Input stream operation
*/
VOID Tellg(VOID);
/**
* Seekp Absolutely move (Reading and writing binary files)
*
* @param DWORD dwSeek absolute move position
* @return VOID
* @note
* @attention Output stream operation
*/
VOID Seekp(DWORD 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 ::