4
我有所谓的 '提示' 一个std ::地图,声明如下:C++ wcout的std ::地图值
std::map<const int, wstring, std::less<int>, std::allocator<std::pair<const int, std::wstring> >> prompts;
它存储INT '键' 和wstring的 '价值' 对。如果我这样做:
wcout << prompts[interpreter->get_state()];
编译器(VC10)抱怨
error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::basic_string<_Elem,_Traits,_Ax>' (or there is no acceptable conversion)
我有什么做的就是从地图返回了wcout打印wstring的价值?某种类型的演员?要么...?
是的,你是对的...我也已经列入代替这是没有帮助或者对我而言....愚蠢的错误。感谢您的帮助... –
Mossen
我会责怪语言,而不是你。 – cdiggins