小编sti*_*ort的帖子

编译器如何将值写入此构造中该对的第二个值?

map<int,int> a;
pair<std::map<int,int>::iterator ,bool> f;
f=(a.insert({0,0}));
cout<<f.second;
Run Code Online (Sandbox Code Playgroud)

为什么输出1呢?

对于该对中的任何值,它始终输出 1

c++ stdmap std-pair

0
推荐指数
1
解决办法
95
查看次数

标签 统计

c++ ×1

std-pair ×1

stdmap ×1