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