在STL中查找算法 [英] Find algorithm in STL
本文介绍了在STL中查找算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我在STL中使用的查找算法有问题
直接从书中定义
查找算法是一个可以应用于许多STL容器的操作(函数)。它搜索容器(或所有元素)中元素的子范围,寻找等于的元素。指定的值; 必须为容器的元素类型定义相等运算符(==)。
在上面的定义中,我遇到了问题大胆的文字
现在这里的myClass如下
Hi guys,
I have problem regarding find algorithm used in STL
Defination directly from book
The find algorithm is an operation (function) that can be applied to many STL containers. It searches a subrange of the elements in a container (or all the elements), looking for an element that is "equal to" a specified value; the equality operator (==) must be defined for the type of the container''s elements.
In the defination above i''m having problem with the bold text
Now here is myClass as follows
展开 | < span class =codeLinkonclick =selectAll(this);>选择 | 换行 | 行号
推荐答案
大家好,
我对STL中使用的查找算法有疑问
直接从书中定义
查找算法是ca的操作(函数) n适用于许多STL容器。它搜索容器(或所有元素)中元素的子范围,寻找等于的元素。指定的值; 必须为容器的元素类型定义相等运算符(==)。
在上面的定义中,我遇到了问题大胆的文字
现在这里的myClass如下
Hi guys,
I have problem regarding find algorithm used in STL
Defination directly from book
The find algorithm is an operation (function) that can be applied to many STL containers. It searches a subrange of the elements in a container (or all the elements), looking for an element that is "equal to" a specified value; the equality operator (==) must be defined for the type of the container''s elements.
In the defination above i''m having problem with the bold text
Now here is myClass as follows
展开 | < span class =codeLinkonclick =selectAll(this);>选择 | Wrap | 行号
大家好,
我对STL中使用的查找算法有疑问
直接定义来自book
find算法是一个可以应用于许多S的操作(函数) TL容器。它搜索容器(或所有元素)中元素的子范围,寻找等于的元素。指定的值; 必须为容器的元素类型定义相等运算符(==)。
在上面的定义中,我遇到了问题大胆的文字
现在这里的myClass如下
Hi guys,
I have problem regarding find algorithm used in STL
Defination directly from book
The find algorithm is an operation (function) that can be applied to many STL containers. It searches a subrange of the elements in a container (or all the elements), looking for an element that is "equal to" a specified value; the equality operator (==) must be defined for the type of the container''s elements.
In the defination above i''m having problem with the bold text
Now here is myClass as follows
展开 | < span class =codeLinkonclick =selectAll(this);>选择 | Wrap | 行号
感谢,
解决方案有效,但我还不清楚。
现在首先要说的是,<1之间的主要区别是什么? br />
Hi thankx,
The solution works but I''m not still clear.
Now first thing first, what is the main difference between
展开 | 选择 | Wrap | 行号
这篇关于在STL中查找算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文