腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(6941)
视频
沙龙
1
回答
不
匹配
operators[]
DP_Wine_problem.cpp:42:17:
error
:
不
匹配
“
operator
[]”(
操作数
类型
为
'
std
::__
cxx11
::
list
‘
和
'long long
int
')^ DP_Wine_problem.cpp:42:22:
error
:
不
匹配
“
o
浏览 2
提问于2020-05-05
得票数 1
回答已采纳
1
回答
C++
Error
project.cpp
:
11
:
20
:
error
:'
operator
[]‘
不
匹配
(
操作数
类型
为
'
std
::__
cxx11
::
list
<
int
>’
和
'
int
')
好了,我是
c++
的新手,我正在尝试通过youtube的教程
和
网站自学。我想做的是做一个列表,然后在列表中添加内容。在我尝试获取列表中的内容之前,它运行得很好。我得到错误
project.cpp
:
11
:
20
:
error
: no match for '
operator
[]‘(
操作数
类型
是'
std
::__
cxx11
::
list
’
和
'
浏览 25
提问于2021-04-04
得票数 0
3
回答
错误信息:在使用"string* +=“后”没有
匹配
的‘+=’“
、
、
我对
c++
有个问题。我使用了一个字符串指针,并希望动态地添加另一个字符串。但我收到了一条错误信息:
不
匹配
“
operator
+=”(
操作数
类型
为
“
std
::__
cxx11
::string* {aka
std
::__
cxx11
::basic_string*}”
和
“
std
::__
cxx11
::string {aka
std
::__<
浏览 1
提问于2020-06-18
得票数 0
1
回答
为什么用
c++
编译文件系统代码时会返回这个错误?
、
、
我得到了一个错误#include <fstream>#include <filesystem>namespace fs =
std
::filesystem; { fs::create_directoryc:\mingw\mingw\includ
浏览 0
提问于2019-08-21
得票数 1
3
回答
将字符串中的元素与
C++
中的长度-1字符串进行比较
、
a[0]应该是"a"以外的其他什么 cout << a << endl;}
不
匹配
“
operator<
浏览 1
提问于2018-06-18
得票数 1
回答已采纳
1
回答
我在
c++
中定义了一个数组列表来表示一个图。但我似乎无法访问数组的元素
、
、
、
基本上,这就是我所做的,一个用作数组列表的
int
指针列表:
list
<
int
> *l;我可以push_back(整数但是,当我使用lx在列表中的"x“位置访问数组的一个元素时,这是我得到的错误: 错误:与“
operator
[]”
不
匹配
(
操作数
类型
为
“<
浏览 0
提问于2021-03-31
得票数 1
回答已采纳
3
回答
C++
运算符'==‘不能将string[i]与另一个字符串进行比较。编译错误
#include <iostream>{ string x = "a";错误:
不
匹配
‘
operator
==’(
操作数
类型
为
‘__gnu_cxx::__alloc_traits,char>::value_type’{aka‘char’}
和
‘
st
浏览 2
提问于2019-10-29
得票数 0
回答已采纳
3
回答
c++
中的地图、矢量
、
、
、
、
错误:与“
operator
<<”
不
匹配
(
操作数
类型
为
‘
std
::basic_ostream’
和
‘
std
::pair<const
std
::__
cxx11
::basic_string,
std
::vector>’) 我想要相同的键
和
多个值,例如键是10个值是2,3,4,但是"*iter“是错误的。如何在
c++
中绘制地
浏览 2
提问于2020-11-04
得票数 0
回答已采纳
1
回答
错误:
不
匹配
“
operator
+”(
操作数
类型
为
“
std
::__
cxx11
::
list
<
int
>”
和
“
int
”)
、
、
我试图获取偶数整数数组
和
奇数整数列表,然后使用 merge 算法将它们合并到向量中,这在
C++
的STL中是可用的。>using namespace
std
;
list
<
int
>::iterator p;
list
<
int
> o
浏览 2
提问于2020-07-17
得票数 3
回答已采纳
2
回答
为什么我不能用ostream
和
map(或unordered_map)重载unordered_map?
、
、
、
、
但是,如果<<的第二个
操作数
是
std
::map(或unordered_map)的对象,则我的代码不能通过GCC进行编译,而其他
类型
的第二个
操作数
则可以接受。我试过
int
,字符串,c-字符串,向量等等.除了地图
和
unordered_map,所有这些都是可以的。return EXIT_SUCCESS;GCC的错误信息是: /usr/include/
c++
/8/ostream:656:
11</em
浏览 4
提问于2019-09-30
得票数 0
1
回答
使用"string_view“表示"string”键
、
当我在Protobuf3.8.0中使用map<string, string> kv;时,下面的代码可以工作:kv[key] = "value"错误信息是: 'google::protobuf::Map<
std
::__
cxx11
::basic_string错误:
不
匹配
“
operator
[]”(
操作数
类型
为
<em
浏览 7
提问于2022-05-09
得票数 0
回答已采纳
2
回答
C++
赋值
std
::
list
<typename>::iterator可以在main中工作,但在方法中不能
、
我有一个想法,就是让函数增加
std
::
list
::iterator,当iterator赋值
为
list
.end =
list
.begin()时,就会赋值给iterator。不幸的是,没有
匹配
赋值运算符。>&,
std
::__
cxx11
::
list
<
int
>::iterator*,
int
&)’: /home/tomek/Documents
浏览 5
提问于2020-06-25
得票数 0
1
回答
重载的
operator
<<模板不适用于
std
::
list
,尽管它适用于
std
::
operator
<<
、
std
::
list
时,它会产生错误消息。错误:
不
匹配
“
operator
<<”(
操作数
类型
为
‘
std
::ostream {aka
std
::basic_ostream}’
和
‘
std
::__
cxx11
::
list
’) cout << li;(){}; Item(string n,
int
i, dou
浏览 1
提问于2016-12-26
得票数 1
回答已采纳
2
回答
将整数转换为
std
::
list
的迭代器
、
下面是简单的代码:#include <
list
>using namespace
std
; {
list
<
int
> ints = { 3, 6, 1, 5, 8 };
std
::
list
<
int
>::it
浏览 0
提问于2020-04-28
得票数 0
回答已采纳
1
回答
两个自动变量的比较
、
#include <iostream> { auto b{1}; cout << "equal"; return 0;为什么上面的
C++
代码在g++编译器中以c++
11
标准返回一个错误,而不是打印“相等”作为输出?test.cpp:9:14:错误:
不
匹配
‘
ope
浏览 1
提问于2016-06-29
得票数 0
回答已采纳
2
回答
为什么这个字符串操作不能工作?
以下是代码:#include <iostream> { getline(cin, sidelength);}错误:
不
匹配
‘操作符*’(
操作数
类型
为<
浏览 1
提问于2020-03-23
得票数 0
1
回答
是否隐含来自同一类的字符串
和
int
的转换?
、
怎样才能同时对string
和
int
使用隐式转换操作符呢?for ‘
operator
=’ (operand types are ‘
std
::__
cxx11
::string {aka
std
::__
cxx11
::basic_string<char>}’ and_Traits, _Alloc>&
std
::__
cxx11
::basic_string<_CharT, _Traits, _Alloc>::<
浏览 2
提问于2019-01-15
得票数 0
3
回答
访问动态创建的向量的元素
、
vector <
int
> * v = new vector <
int
>;cout << v[0]<< endl; //
error
错误:
不
匹配
“
operator
<<”(
操作数
类型
为
'
std
::ostream {aka
std</
浏览 2
提问于2020-07-28
得票数 0
2
回答
我想要在
c++
中实现地图,因为我不能检查向量大小并给出我创建的向量的值
、
、
、
、
我创建了两个类Node
和
Map,当我试图在Map Constructor中获取table_size并希望将所有向量值赋值
为
nullptr时,它会给我带来错误。for ‘
operator
=’ (operand types are ‘
std
::vector<Node<
std
::__
cxx11
::basic_string<char>,
std
::__
cxx11
::7: note: candidate: ‘
std
::v
浏览 3
提问于2020-10-13
得票数 1
回答已采纳
3
回答
C++
类
和
访问
、
、
main()':| |
20
|note: candidate: user& user::
operator
=(c
浏览 1
提问于2018-05-29
得票数 0
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
C++20:核心语言
《Effective Modern C+》笔记之类型推断
你们以为我在学C加加?其实我在学Python!人生苦短!
Socket网络编程之UDP客户端
【C语言教程】双向链表学习总结和C语言代码实现!值得学习
热门
标签
更多标签
云服务器
ICP备案
腾讯会议
云直播
对象存储
活动推荐
运营活动
广告
关闭
领券