std :: sort使用成员函数作为BinaryPredicate [英] std::sort using a member function as the BinaryPredicate
本文介绍了std :: sort使用成员函数作为BinaryPredicate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有谁知道怎么做?
Does anyone know how to do this?
推荐答案
" Peter Olcott" <醇**** @ att.net>在新闻中写道:xQNTe.8191
"Peter Olcott" <ol****@att.net> wrote in news:xQNTe.8191
UI.4718
@ okepread05:
UI.4718
@okepread05:
有谁知道该怎么做这个?
Does anyone know how to do this?
成员函数是什么?你的描述有些模糊。一个成员
其他一些不相关的类的功能。例如:
std :: sort(somevector.begin(),somevector.end(),& otherclass :: memfun);
? (是的,我知道上面不会工作......但是用于说明
用途)
A member function of what? Your description is somewhat vague. A member
function of some other unrelated class. For example:
std::sort(somevector.begin(), somevector.end(), &otherclass::memfun);
? (and yes, I know the above won''t work... but serves for illustration
purposes)
" Andre Kostur" < NN ****** @ kostur.net>在留言新闻中写道:Xn ******************************* @ 207.35.177。 134 ...
"Andre Kostur" <nn******@kostur.net> wrote in message news:Xn*******************************@207.35.177. 134...
" Peter Olcott" <醇**** @ att.net>在新闻中写道:xQNTe.8191
"Peter Olcott" <ol****@att.net> wrote in news:xQNTe.8191
这篇关于std :: sort使用成员函数作为BinaryPredicate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文