iCAx开思网

标题: fstream::open问题 [打印本页]

作者: 王洋1210    时间: 2013-11-12 11:20
标题: fstream::open问题
我写了下面的代码:
std::fstream Pointfile;
Pointfile.open(_panel->GetPath(),std::fstream::in);
出现的问题:
d:\myproject\caacreatecruve\caacreatecruve.m\src\caacreatepointcmd.cpp(277) : error C2668: 'std::basic_fstream<_Elem,_Traits>:pen' : ambiguous call to overloaded function
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        c:\program files\microsoft visual studio 8\vc\include\fstream(912): could be 'void std::basic_fstream<_Elem,_Traits>:pen(const char *,std::ios_base:penmode,int)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        c:\program files\microsoft visual studio 8\vc\include\fstream(870): or 'void std::basic_fstream<_Elem,_Traits>:pen(const wchar_t *,std::ios_base:penmode,int)'
        with
        [
            _Elem=char,
            _Traits=std::char_traits<char>
        ]
        while trying to match the argument list '(CATUnicodeString, const std::_Iosb<_Dummy>::_Openmode)'
        with
        [
            _Dummy=int
        ]
请问该怎么解决啊?




欢迎光临 iCAx开思网 (https://www.icax.org/) Powered by Discuz! X3.3