Click here to Skip to main content
15,913,162 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Explorer extension dll - WM_SHUTDOWN Pin
Igor Vigdorchik24-Nov-04 10:00
Igor Vigdorchik24-Nov-04 10:00 
GeneralRe: Explorer extension dll - WM_SHUTDOWN Pin
AssemblySoft24-Nov-04 22:57
AssemblySoft24-Nov-04 22:57 
QuestionHow to embeded a button onto the FlexGrid Cell? Pin
bohrium23-Nov-04 23:34
bohrium23-Nov-04 23:34 
GeneralVB ActiveX into ATL project Pin
Brian Gould23-Nov-04 20:24
Brian Gould23-Nov-04 20:24 
QuestionWhich collection class to use? Pin
paulb23-Nov-04 19:02
paulb23-Nov-04 19:02 
AnswerRe: Which collection class to use? Pin
Joaquín M López Muñoz23-Nov-04 21:13
Joaquín M López Muñoz23-Nov-04 21:13 
Questionusing ATL7.0 instead of ATL3, I'm missing something but what? Pin
seriema23-Nov-04 14:05
seriema23-Nov-04 14:05 
AnswerRe: using ATL7.0 instead of ATL3, I'm missing something but what? Pin
Robert Bielik24-Nov-04 21:02
Robert Bielik24-Nov-04 21:02 
GeneralRe: using ATL7.0 instead of ATL3, I'm missing something but what? Pin
seriema25-Nov-04 3:06
seriema25-Nov-04 3:06 
AnswerRe: using ATL7.0 instead of ATL3, I'm missing something but what? Pin
seriema25-Nov-04 14:37
seriema25-Nov-04 14:37 
Generalconverting BSTR to char* Pin
Andy H23-Nov-04 3:36
Andy H23-Nov-04 3:36 
GeneralRe: converting BSTR to char* Pin
Steve S23-Nov-04 5:27
Steve S23-Nov-04 5:27 
GeneralRe: converting BSTR to char* Pin
Andy H23-Nov-04 5:36
Andy H23-Nov-04 5:36 
GeneralRe: converting BSTR to char* Pin
peterchen23-Nov-04 14:17
peterchen23-Nov-04 14:17 
GeneralRe: converting BSTR to char* Pin
Andy H23-Nov-04 22:20
Andy H23-Nov-04 22:20 
GeneralRe: converting BSTR to char* Pin
peterchen23-Nov-04 22:37
peterchen23-Nov-04 22:37 
GeneralRe: custom allocator for one container instance Pin
Joaquín M López Muñoz22-Nov-04 9:42
Joaquín M López Muñoz22-Nov-04 9:42 
GeneralRe: custom allocator for one container instance Pin
peterchen22-Nov-04 13:04
peterchen22-Nov-04 13:04 
GeneralRe: custom allocator for one container instance Pin
Joaquín M López Muñoz22-Nov-04 21:50
Joaquín M López Muñoz22-Nov-04 21:50 
GeneralRe: custom allocator for one container instance Pin
Andrew Walker22-Nov-04 16:02
Andrew Walker22-Nov-04 16:02 
GeneralRe: custom allocator for one container instance Pin
Joaquín M López Muñoz22-Nov-04 21:57
Joaquín M López Muñoz22-Nov-04 21:57 
GeneralRe: custom allocator for one container instance Pin
peterchen22-Nov-04 23:21
peterchen22-Nov-04 23:21 
GeneralRe: custom allocator for one container instance Pin
Joaquín M López Muñoz22-Nov-04 23:03
Joaquín M López Muñoz22-Nov-04 23:03 
Generalcustom allocator for one container instance Pin
peterchen22-Nov-04 8:19
peterchen22-Nov-04 8:19 
Generallist::sort() question Pin
nm_11421-Nov-04 16:51
nm_11421-Nov-04 16:51 
Can someone tell me why the following doesn't compile:

#include <list>
using namespace std;


class CSort
{
public:
    CSort(int i) : m_i(i) { }
    int m_i;
};

struct lessThan : public greater<CSort>
{
    bool operator()(const CSort &pfi1, const CSort &pfi2) const
    {
	return pfi1.m_i < pfi2.m_i;
    }
};

void SortTest()
{
    list<CSort> l3;
    l3.push_back(CSort(11));
    l3.push_back(CSort(01));
    l3.push_back(CSort(21));
    l3.push_back(CSort(14));
    l3.push_back(CSort(41));
    l3.sort(lessThan());
}

int main(int argc, char* argv[])
{
    SortTest();
    return 0;
}


it gives me the following errors:

C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\functional(80) : error C2784: 'bool __cdecl std::operator >(const class std::list<_Ty,_A> &,const class std::list<_Ty,_A> &)' : could not deduce template argument for 'const class std::list<_Ty,_
A> &' from 'const class CSort'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\functional(80) : while compiling class-template member function 'bool __thiscall std::greater<class csort="">::operator ()(const class CSort &,const class CSort &) const'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\functional(80) : error C2784: 'bool __cdecl std::operator >(const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &,const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &)' : could not deduce te
mplate argument for 'const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &' from 'const class CSort'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\functional(80) : while compiling class-template member function 'bool __thiscall std::greater<class csort="">::operator ()(const class CSort &,const class CSort &) const'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\functional(80) : error C2784: 'bool __cdecl std::operator >(const struct std::pair<_T1,_T2> &,const struct std::pair<_T1,_T2> &)' : could not deduce template argument for 'const struct std::pair<
_T1,_T2> &' from 'const class CSort'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\functional(80) : while compiling class-template member function 'bool __thiscall std::greater<class csort="">::operator ()(const class CSort &,const class CSort &) const'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\functional(80) : error C2676: binary '>' : 'const class CSort' does not define this operator or a conversion to a type acceptable to the predefined operator
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\functional(80) : while compiling class-template member function 'bool __thiscall std::greater<class csort="">::operator ()(const class CSort &,const class CSort &) const'


thanks.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.