我正在尝试将整个文件读入缓冲区,但由于某种原因,新行字节('\n')被忽略了。任何想法为什么?
std::ifstream fin( p_FilePath.c_str( ), std::ifstream::binary );
if( !fin.is_open( ) )
{
return false;
}
fin.seekg( 0, std::ios::end );
int FileSize = fin.tellg( );
fin.seekg( 0, std::ios::beg );
char * pData = new char[ FileSize ];
fin.read( pData, FileSize );