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

标签 stl namespaces set

我读过 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/

相关文章:

jquery - MooTools 版本的 jQuery 命名空间事件?

c++ - 是否有建议让 c++ 使用短枚举值的上下文?

python - 列表和集合的成员资格测试有何不同?

c++ - 我如何 (C++ STL) binary_search 抽象类?

php - PHP 5.2 中的命名空间

java - 如何对 HashSet 进行排序?

java - 删除 TreeSet 的匹配元素

c++ - 有没有简单的方法来动态增加 boost::multi_array 维度?

c++ - 如何在 g++ 中使用不同的 STL

c++ - undefined symbol std::__throw_bad_function_call