gpt4 book ai didi

STL - 在使用 STL 集容器时将 "using namespace std"添加到代码中时调用哪个 find() 函数?

转载 作者:行者123 更新时间:2023-12-04 17:05:22 24 4
gpt4 key购买 nike

我读过 STL Set 容器有一个专门的 find() 函数,它比 std::find() 更有效。我的问题是如果我使用 using namespace std 会调用哪个 find() 函数?

最佳答案

std::find是一个免费功能,std::set::find是set的成员函数,调用方式不同。
引用:http://www.cplusplus.com/reference/set/set/find/
https://www.cplusplus.com/reference/algorithm/find/
到家后我会填写详细信息,但应该很明显。

关于STL - 在使用 STL 集容器时将 "using namespace std"添加到代码中时调用哪个 find() 函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68788834/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com