- 论坛徽章:
- 0
|
vector<Diameter> return_msgs;
Diameter msg;
return_msgs.push_back(msg);
主要程序如上所示,Diameter类为自己创建的类,程序编译时出现错误如下:
"/opt/aCC/include_std/vector.cc", line 121: error #2349: no operator "="
matches these operands
operand types are: Diameter = const Diameter
*__position = __x;
^
detected during instantiation of "void std::vector<_TypeT,
_Allocator>::_C_insert_aux(_Allocator::pointer,
_Allocator::const_reference) [with _TypeT=Diameter,
_Allocator=std::allocator<Diameter>]" at line 566 of
"/opt/aCC/include_std/vector"
求大神解释是什么原因导致的? |
|