二进制“<<”: 没有找到接受“const std::basic_string<char,std::char_traits<char>,std::allocator<char>>”类型的右操作数的运算

博客指出代码中缺少 #include <string> 头文件,添加该头文件即可解决问题,涉及 C++ 编程中头文件的使用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

少了 #include <string> 头文件,加上就对了。
boost::property_tree::read_xml(strTmp, pt);加入这个严重性 代码 说明 项目 文件 行 禁止显示状态 详细信息 错误 LNK2019 无法解析的外部符号 "void __cdecl boost::throw_exception(class std::exception const &,struct boost::source_location const &)" (?throw_exception@boost@@YAXAEBVexception@std@@AEBUsource_location@1@@Z),函数 "void __cdecl boost::property_tree::xml_parser::read_xml<class boost::property_tree::basic_ptree<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class boost::property_tree::basic_ptree<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &,int,class std::locale const &)" (??$read_xml@V?$basic_ptree@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@property_tree@boost@@@xml_parser@property_tree@boost@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAV?$basic_ptree@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@12@HAEBVlocale@4@@Z) 中引用了该符号 D:\SAMA\sama\build\msvc-Debug\sama D:\SAMA\sama\build\msvc-Debug\copidfunction.cpp.obj 1 错误 LNK1120 1 个无法解析的外部命令 D:\SAMA\sama\build\msvc-Debug\sama D:\SAMA\sama\out\MSVC-Debug\sama.exe 1
03-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值