Click here to Skip to main content
15,912,897 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual C++ and Windows XP Pin
dinger15-Oct-02 6:28
dinger15-Oct-02 6:28 
GeneralHelp with STL and Function Adapters Pin
Neville Franks13-Oct-02 16:21
Neville Franks13-Oct-02 16:21 
GeneralRe: Help with STL and Function Adapters Pin
Anonymous13-Oct-02 19:24
Anonymous13-Oct-02 19:24 
GeneralRe: Help with STL and Function Adapters Pin
Neville Franks13-Oct-02 19:58
Neville Franks13-Oct-02 19:58 
GeneralRe: Help with STL and Function Adapters Pin
Joaquín M López Muñoz13-Oct-02 21:13
Joaquín M López Muñoz13-Oct-02 21:13 
GeneralRe: Help with STL and Function Adapters Pin
Neville Franks13-Oct-02 21:33
Neville Franks13-Oct-02 21:33 
GeneralRe: Help with STL and Function Adapters Pin
Joaquín M López Muñoz13-Oct-02 21:35
Joaquín M López Muñoz13-Oct-02 21:35 
GeneralRe: Help with STL and Function Adapters Pin
Stuart Dootson14-Oct-02 18:55
professionalStuart Dootson14-Oct-02 18:55 
If you add the const back in, it works with STLport (4.5.something - the current version). Note that mem_fun1_ref isn't part of the standard (AFAIR). Single argument member functions are supported (in the Standard & STLPort) through overloading mem_fun_ref.

I'd second Joaquín Muñoz - Boost has a nice substitute for functional that works very nicely...as does most of the rest of Boost Smile | :) . The following line of code is the Boost equivalent of the STL code...the '_1' is a placeholder for the iterator parameter supplied in for_each.

for_each( col1.begin(), col1.end(), boost::bind( &Person::printWithPrefix , _1, "person: " ) );    


One other thing you can do with the Boost version - make the parameter to printWithPrefix a const std::string& - Boost works around the C++ rule that you can't take a reference to a reference.

Stuart Dootson

'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
GeneralRe: Help with STL and Function Adapters Pin
Neville Franks14-Oct-02 19:18
Neville Franks14-Oct-02 19:18 
GeneralRe: Help with STL and Function Adapters Pin
Stuart Dootson15-Oct-02 7:33
professionalStuart Dootson15-Oct-02 7:33 
QuestionHow To Declare This Array? Pin
ooosawaddee313-Oct-02 9:52
ooosawaddee313-Oct-02 9:52 
AnswerRe: How To Declare This Array? Pin
Navin13-Oct-02 9:55
Navin13-Oct-02 9:55 
AnswerRe: How To Declare This Array? Pin
BlackKettle13-Oct-02 10:08
BlackKettle13-Oct-02 10:08 
GeneralRe: How To Declare This Array? Pin
Jon Hulatt13-Oct-02 21:37
Jon Hulatt13-Oct-02 21:37 
GeneralRe: How To Declare This Array? Pin
Michael Dunn14-Oct-02 1:04
sitebuilderMichael Dunn14-Oct-02 1:04 
GeneralFLOAT/STRING conversions Pin
Atlence13-Oct-02 9:10
Atlence13-Oct-02 9:10 
GeneralRe: FLOAT/STRING conversions Pin
Joaquín M López Muñoz13-Oct-02 9:21
Joaquín M López Muñoz13-Oct-02 9:21 
GeneralRe: FLOAT/STRING conversions Pin
Atlence14-Oct-02 1:37
Atlence14-Oct-02 1:37 
GeneralRe: FLOAT/STRING conversions Pin
Jason Henderson13-Oct-02 17:14
Jason Henderson13-Oct-02 17:14 
GeneralRe: FLOAT/STRING conversions Pin
jhwurmbach14-Oct-02 1:35
jhwurmbach14-Oct-02 1:35 
GeneralQuestion about how to get the Control's ID in a message handler Pin
Matias13-Oct-02 7:37
Matias13-Oct-02 7:37 
GeneralRe: Question about how to get the Control's ID in a message handler Pin
Joaquín M López Muñoz13-Oct-02 8:32
Joaquín M López Muñoz13-Oct-02 8:32 
GeneralRe: Question about how to get the Control's ID in a message handler Pin
Matias13-Oct-02 11:06
Matias13-Oct-02 11:06 
GeneralGet the Class Name Pin
Gaurika Wijeratne13-Oct-02 7:21
Gaurika Wijeratne13-Oct-02 7:21 
GeneralRe: Get the Class Name Pin
pankajdaga13-Oct-02 10:12
pankajdaga13-Oct-02 10:12 

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.