[C.C++] c语言error c2679,这个异常如何解决,error C2679: binary '<<'

444 0
Honkers 2025-3-6 20:23:53 | 显示全部楼层 |阅读模式

C/C++ code#include

#include

#include

#include

#include

using namespace std;

typedef map months_type;

namespace std

{

template

ostream& operator< &p)

{

cout<

return out;

}

ostream& operator<

{

copy(l.begin(), l.end(), ostream_iterator<:value_type>(out, ";\n"));

return out;

}

}

void main()

{

months_type months;

typedef months_type::value_type value_type;

months.insert(value_type(string("January"),31));

months.insert(value_type(string("February"),28));

months.insert(value_type(string("April"),30));

months.insert(value_type(string("March"),31));

cout<

}

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Honkers

荣誉红客

关注
  • 4008
    主题
  • 36
    粉丝
  • 0
    关注
这家伙很懒,什么都没留下!

中国红客联盟公众号

联系站长QQ:5520533

admin@chnhonker.com
Copyright © 2001-2025 Discuz Team. Powered by Discuz! X3.5 ( 粤ICP备13060014号 )|天天打卡 本站已运行