腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
4
回答
错误
:‘
operator
<<’
没有
匹配
项
(
操作数
类型
是
‘
std
::
ostream
’{
又名
‘
std
::
basic_ostream
<
char
>’}
和
‘
std
::_
List_iterator
<
int
>’)
c++
、
std
、
stdlist
你好,我试图打印一个整数列表,但我一直收到
错误
。 我有一个结构,上面有一个列表。struct faceFiguration{ list setofVertices; currentFace++; } 这是完整的消息
错误<
浏览 79
提问于2021-03-02
得票数 0
回答已采纳
1
回答
重载运算符时出现编译
错误
c++
无法理解为什么会出现
错误
错误
:
没有
匹配
的‘
operator
<<’(
操作数
类型
是
‘
std
::
ostream
’{
又名
‘
std
::
basic_ostream
’}
和
‘MyStruct’) cout << st; 在以下代码中 #include <iostream> using namespace
std</e
浏览 15
提问于2021-05-09
得票数 0
回答已采纳
3
回答
C++类模板
c++
、
templates
#include <iostream> template <class T>{&
operator
<< (
ostream
&o,mcomplex &c);{
浏览 30
提问于2018-09-30
得票数 0
1
回答
如何使用模板对const使用运算符重载
c++
、
templates
、
constants
、
operator-overloading
我很成功,但是我对const数据
类型
和
对象有问题。编译器给我提供了以下内容:我
和
gcc一起在MAC有人能帮我理解上面的
错误
意味着什么,以及
浏览 5
提问于2020-12-22
得票数 0
回答已采纳
2
回答
迭代列表
c++
、
struct
、
operator-overloading
错误
代码
是
我的代码。): or '
std
::
basic_ostream
<_Elem,_Traits> &
std
::
basic_ostream
<_Elem,_Traits>::
operator
<<(
int
)'::
char
_traits<
char
>,
std
::_
List_iterator
<_
浏览 0
提问于2014-03-08
得票数 2
回答已采纳
4
回答
"
std
::cout <<
std
::endl;“
是
如何编译的?
c++
、
templates
、
overload-resolution
、
iomanip
大多数都是具有以下签名的常规函数:然而,一些操纵器(包括最常用的
和
)是以下形式的模板:
std
::
basic_ostream
<CharT, Traits>& func(
std
::
basic_ostream
<CharT, Traits>& os)
浏览 0
提问于2016-10-29
得票数 17
回答已采纳
7
回答
为任意向量编写
operator
<<模板
c++
、
c++11
、
templates
犯了一个奇怪的
错误
:
std
::
ostream
&
operator
<<(
std
::
ostream
& os, const(const auto& v : c) { } return os; v
浏览 5
提问于2017-07-12
得票数 7
2
回答
漂亮打印嵌套向量
c++
、
vector
、
compiler-errors
、
pretty-print
我有以下代码来漂亮地打印泛型向量-:template<typename T1>{ vector<
int
> b; //
浏览 4
提问于2015-06-30
得票数 3
回答已采纳
2
回答
为什么输出带有转换运算符的类不适用于
std
::string?
c++
、
templates
、
compiler-errors
、
implicit-conversion
String {
operator
std
::string() const {return s;} Strings;
std
::cout << s;以下
是
错误
的相关部分:
错误
:不
匹配
“
operator
<<”(
操作数
<em
浏览 0
提问于2013-07-09
得票数 6
回答已采纳
3
回答
访问动态创建的向量的元素
c++
、
vector
vector <
int
> * v = new vector <
int
>;cout << v[0]<< endl; // error
错误
:不
匹配
“
operator
<<”(
操作数
类型
为'
std
::
ostream
{aka
std</
浏览 2
提问于2020-07-28
得票数 0
1
回答
std
::make_pair
类型
演绎
c++
、
templates
、
c++11
、
stl
<_CharT,_Traits>&
std
::
operator
<<(
std
::
basic_ostream
<_CharT,_Traits>&&,const _Tp&)与_CharT =
char
;_Traits=
std
::
char
_traits;_Tp =
std
::pair<type,const >‘
operator
<<(
basic_
浏览 2
提问于2015-05-01
得票数 4
回答已采纳
1
回答
如何初始化
std
::cout的自定义模拟?
c++
、
cout
、
stdstring
、
char-traits
我不打算使用
std
::
char
_traits
和
性病的其他特性,因为我自己已经实现了这些特性。如何创建可以用于字符串的
std
::cout的直接模拟,并为此使用
std
::
basic_ostream
?::cout中使用它,如下所示:但问题
是
:“
没有
任何
operator
<<与这些
操作数
匹配
”。原因
是
::cout使用的
是
<
浏览 3
提问于2022-11-16
得票数 -2
1
回答
为什么我得到一个
错误
没有
匹配
'
operator
^‘
c++
、
operators
、
xor
、
operator-precedence
我收到一个
错误
In file included from /usr/include/c++/4.9/ios:42:0, from
浏览 4
提问于2016-10-08
得票数 2
7
回答
如何用__
int
128打印g++?
c++
、
iostream
、
int128
在我的__
int
128程序中,我使用GCC内置
类型
的C++做了几件事,
没有
什么真正的意义,至少不足以证明只为这个目的使用BigInt库
是
合理的,但足以防止完全删除它。当我遇到我的类中的打印部分时,我的问题出现了,下面
是
一个最小的例子:{
std
::cout << t <<
std</e
浏览 11
提问于2014-08-04
得票数 54
回答已采纳
3
回答
我应该按照问题声明打印5,4,3,2,1,但我的c++代码显示了一些
错误
function
、
recursion
、
c++14
我正在犯
错误
#include <iostream> using namespac
浏览 4
提问于2020-04-30
得票数 0
4
回答
为我在C++中创建的对象声明变量
c++
、
object
、
constructor
、
declaration
我
是
一个Java爱好者,我正在尝试
和
C++一起做一个班级的作业。我在声明我创建的一个
类型
的变量作为另一个类的属性时遇到了问题。>&
std
::
basic_ostream
<_CharT, _Traits>::
operator
<<(
int
) [with _CharT =
char
, _Traits =
std
::
char
_traits&
std
::
b
浏览 2
提问于2012-02-09
得票数 0
回答已采纳
2
回答
基于STL容器
类型
的C++无法执行流控制
c++
、
visual-c++
、
c++11
、
stl
编译器似乎在编译时解析整个ContainerPrinterClass,当它到达一个STL容器中传递的元素不支持的行时抛出一个
错误
,例如,向量中
int
类型
的element.first/element.second相反的情况
是
,当映射被传递到打印函数中,编译器在else条件中标记
错误
,它试图打印元素,这是一个
std
::结对,不能。我还尝试替换(typeid(*container) == typeid(
std
::map<
int
,
st
浏览 6
提问于2014-11-04
得票数 0
回答已采纳
1
回答
uint8_t
和
int
8_t转换
c++
、
type-conversion
根据 否则,两个
操作数</
浏览 3
提问于2022-11-12
得票数 0
回答已采纳
3
回答
std
::vector :无法将'
std
::
ostream
{aka
std
::
basic_ostream
<
char
>}‘左值绑定到'
std
::
basic_ostream
<
char
>&&’
c++
、
gcc
、
c++11
、
stl
、
iostream
当我尝试做一些像这样简单的事情时,我遇到了一个令人困惑的
错误
消息上面写着 cannot bind '
std
::
ostream
{aka
std
::
basic_ostream
<
char
>}' lvalue to '
std
::
basic_ostream
<<
浏览 0
提问于2014-07-07
得票数 22
回答已采纳
2
回答
为什么此C++ STL代码在编译中失败?
c++
编译
错误
/usr/include/c++/7/bits/stream_iterator.h:199:13:
错误
:与‘
operator
<<’不
匹配
(
操作数
类型
为‘
std
::
ostream
_iterator> >::
ostream
_type {aka
std
::
basic_ostream
}’
和
‘con
浏览 0
提问于2019-08-29
得票数 1
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
C++20:核心语言
boost:asio中的buffer与streambuf简介
如何学好C+。有书自学就够吗?那你可能就还是在入门!
Socket网络编程之UDP客户端
【C+学习笔记】C+异常处理!你绝对不能错过的干货!
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券