Click here to Skip to main content
15,896,726 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: vector behaviour Pin
SilentSilent13-Mar-06 5:13
SilentSilent13-Mar-06 5:13 
AnswerRe: vector behaviour Pin
Malcolm Smart13-Mar-06 10:24
Malcolm Smart13-Mar-06 10:24 
QuestionATL: Directshow ActiveX Component Pin
mkcdev12-Mar-06 3:24
mkcdev12-Mar-06 3:24 
QuestionUsing find_if with vector of pointers ? Pin
squidev11-Mar-06 6:07
squidev11-Mar-06 6:07 
AnswerRe: Using find_if with vector of pointers ? Pin
Pavel Klocek11-Mar-06 17:55
Pavel Klocek11-Mar-06 17:55 
GeneralRe: Using find_if with vector of pointers ? Pin
squidev13-Mar-06 7:37
squidev13-Mar-06 7:37 
AnswerRe: Using find_if with vector of pointers ? Pin
Stephen Hewitt11-Mar-06 23:18
Stephen Hewitt11-Mar-06 23:18 
GeneralRe: Using find_if with vector of pointers ? Pin
Rob Caldecott12-Mar-06 5:37
Rob Caldecott12-Mar-06 5:37 
Wouldn't a "normal" function object work just as well? E.g.:

struct IsID
{
    LPCTSTR id_;
    IsID(LPCTSTR id) : id_(id) { }
    bool operator()(const CMyClass* p) const
    {
        return pClass->GetID() == id_;
    }
};
}
...
if (find_if(myarray.begin(), myarray.end(), IsID(string)) == myarray.end())
{
    // Found
}


I am still relatively new to STL, so am keen to learn what advantages deriving from unary_function will give you. Do you have more details and examples?
GeneralRe: Using find_if with vector of pointers ? Pin
Stephen Hewitt12-Mar-06 15:18
Stephen Hewitt12-Mar-06 15:18 
GeneralRe: Using find_if with vector of pointers ? Pin
Nemanja Trifunovic13-Mar-06 3:03
Nemanja Trifunovic13-Mar-06 3:03 
GeneralRe: Using find_if with vector of pointers ? Pin
Stephen Hewitt13-Mar-06 11:34
Stephen Hewitt13-Mar-06 11:34 
GeneralRe: Using find_if with vector of pointers ? Pin
squidev13-Mar-06 7:39
squidev13-Mar-06 7:39 
AnswerRe: Using find_if with vector of pointers ? Pin
Axter18-Mar-06 12:43
professionalAxter18-Mar-06 12:43 
Questionsaving drawings Pin
_tasleem10-Mar-06 23:05
_tasleem10-Mar-06 23:05 
QuestionHow to pass dialog's WM_CONTEXTMENU to child? Pin
Light Walker10-Mar-06 3:42
Light Walker10-Mar-06 3:42 
AnswerRe: How to pass dialog's WM_CONTEXTMENU to child? Pin
Igor Vigdorchik12-Mar-06 8:42
Igor Vigdorchik12-Mar-06 8:42 
GeneralRe: How to pass dialog's WM_CONTEXTMENU to child? Pin
Light Walker13-Mar-06 13:28
Light Walker13-Mar-06 13:28 
Questionstd::mem_fun / std::mem_fun1 / for_each / member functions Pin
Malcolm Smart10-Mar-06 3:42
Malcolm Smart10-Mar-06 3:42 
AnswerRe: std::mem_fun / std::mem_fun1 / for_each / member functions Pin
valikac10-Mar-06 7:41
valikac10-Mar-06 7:41 
QuestionRe: std::mem_fun / std::mem_fun1 / for_each / member functions Pin
Malcolm Smart10-Mar-06 21:17
Malcolm Smart10-Mar-06 21:17 
AnswerRe: std::mem_fun / std::mem_fun1 / for_each / member functions Pin
valikac11-Mar-06 13:10
valikac11-Mar-06 13:10 
GeneralRe: std::mem_fun / std::mem_fun1 / for_each / member functions Pin
Malcolm Smart11-Mar-06 22:59
Malcolm Smart11-Mar-06 22:59 
GeneralRe: std::mem_fun / std::mem_fun1 / for_each / member functions Pin
valikac12-Mar-06 6:08
valikac12-Mar-06 6:08 
AnswerRe: std::mem_fun / std::mem_fun1 / for_each / member functions Pin
valikac10-Mar-06 7:43
valikac10-Mar-06 7:43 
AnswerRe: std::mem_fun / std::mem_fun1 / for_each / member functions Pin
Lim Bio Liong12-Mar-06 6:03
Lim Bio Liong12-Mar-06 6:03 

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.