Hello David,
Why not just use std::sort() ?
yes! thanks, i have forgot include #include <algorithm>
that is vor VS6 i have think sort() is not available :-)
The rest of my problem is, that my operator < is never called,
so i have a statical comaprisation func.
thanks for Help
regards
Karsten Schulz
--
(www.kahnsoft.de)
typedef class DLLEXPORTUER CPatResult
{
public:
CPatResult(){}
~CPatResult(){}
typedef std::vector<CPatResult *> LstResult;
public:
RECT m_image;
static bool TopLeft(const CPatResult *var1,const CPatResult *var2)
{
return(var1->m_image.top < var2->m_image.top) || (var1->m_image.left
< var2->m_image.left);
}
};
static bool TopLeft(const CPatResult *var1,const CPatResult *var2)
{
return(var1->m_image.top < var2->m_image.top) || (var1->m_image.left
< var2->m_image.left);
}
std::sort(pPattern->m_Patresult.begin(),pPattern->m_Patresult.end(),CPatResult::TopLeft);//void
SortResult(void){
std::sort(g_Pat.m_alignpat.begin(),g_Pat.m_alignpat.end(),lessTestFunction);}""David
Wilkinson" <no-reply@effisols.com> schrieb im
Newsbeitragnews:%23zy4MKuyIHA.4952@TK2MSFTNGP05.phx.gbl...> Karsten
Schulz wrote:>> Hi NG,>>>> i have a std:vector or list, and will sort the
entrys.>> how i can move/insert a entry from bottom to top.>> Karsten:>>
Why not just use std::sort() ?>> --> David Wilkinson> Visual C++ MVP
I'm not sure what your question is now.