find 更好一些。就算不管性能,从代码的可读性和可维护性来看,也应该优先选find。 std::vector<int> v{0, 1, 2, 3, 4}; // 用find,如果以后不需要修改,可以定义 ...
確定! 回上一頁