#include 引起C2665编译错误
VS2005 UNICODE,
在A类的 A.h 文件中使用 #include <vector>
B.h 中 包含 #include <A.h>
就出现如下的C2665错误。请赐教.谢谢.
//1,即使A类中实际并不使用vector也同样报错
//2,B.Cpp中#include <A.h>,不报错.
//3,另外一个 prj 中同样用法却不报错。就当前 prj 不可用, 迷惑...
c:\program files\microsoft visual studio 8\vc\include\xmemory(44) : error C2665: 'operator new' : none of the 5 overloads could convert all the argument types
c:\program files\microsoft visual studio 8\vc\include\new.h(85): could be 'void *operator new(size_t,const std::nothrow_t &) throw()'
c:\program files\microsoft visual studio 8\vc\include\new.h(93): or 'void *operator new(size_t,void *)'
while trying to match the argument list '(char [77], int)'
c:\program files\microsoft visual studio 8\vc\include\xmemory(146) : see reference to function template instantiation '_Ty *std::_Allocate<char>(size_t,_Ty *)' being compiled
with
[
_Ty=char
]
c:\program files\microsoft visual studio 8\vc\include\xmemory(145) : while compiling class template member function 'char *std::allocator<_Ty>::allocate(std::allocator<_Ty>::size_type)'
with
[
_Ty=char
]
c:\program files\microsoft visual studio 8\vc\include\xstring(466) : see reference to class template instantiation 'std::allocator<_Ty>' being compiled
with
[
_Ty=char
]
c:\program files\microsoft visual studio 8\vc\include\xstring(482) : see reference to class template instantiation 'std::_String_val<_Ty,_Alloc>' being compiled
with
[
_Ty=char,
_Alloc=std::allocator<char>
]
c:\program files\microsoft visual studio 8\vc\include\stdexcept(48) : see reference to class template instantiation 'std::basic_string<_Elem,_Traits,_Ax>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits<char>,
_Ax=std::allocator<char>
]