#include <iostream> using namespace std ;..,...attach() ;
代码如下: ofstream os; int fd = open( szFileName, _O_APPEND, _S_IREAD); if ( 0 == fd ) return ; os.attach( fd ); 编译结果: error C2039: 'attach' : is not a member of 'basic_ofstream<char,struct std::char_traits<char> >'
using namespace std ;..,...attach() ;
ofstream os;
int fd = open( szFileName, _O_APPEND, _S_IREAD);
if ( 0 == fd )
return ; os.attach( fd );
编译结果:
error C2039: 'attach' : is not a member of 'basic_ofstream<char,struct std::char_traits<char> >'