700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > C++ std::multiset返回值 has no member named ‘first’

C++ std::multiset返回值 has no member named ‘first’

时间:2022-01-08 22:17:40

相关推荐

C++ std::multiset返回值 has no member named ‘first’

error: ‘std::multiset<>::iterator {aka struct std::_Rb_tree_const_iterator<>}’ has no member named ‘first’

multiset返回的直接是迭代器,所以没有first

// INTEGER EXAMPLE // CPP program to illustrate // Implementation of emplace() function #include <iostream> #include <set> using namespace std; int main() { multiset<int> mymultiset{}; auto result = mymultiset.emplace(3); cout << ' ' << (*result); // printing the multiset for (auto it = mymultiset.begin(); it != mymultiset.end(); ++it) cout << ' ' << *it; return 0; }

multiset::emplace - 游戏蛮牛 - C++中文翻译用户手册

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。