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

C / C++ / MFC

 
GeneralVisual C++ and Windows XP Pin
dinger13-Oct-02 16:52
dinger13-Oct-02 16:52 
GeneralRe: Visual C++ and Windows XP Pin
Nish Nishant13-Oct-02 17:10
sitebuilderNish Nishant13-Oct-02 17:10 
GeneralRe: Visual C++ and Windows XP Pin
Jon Hulatt13-Oct-02 21:35
Jon Hulatt13-Oct-02 21:35 
GeneralRe: Visual C++ and Windows XP Pin
Gero Gerber14-Oct-02 7:11
Gero Gerber14-Oct-02 7:11 
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 
Thanks, but...

The example I gave was straight from: "The C++ Standard Library" by
Nioclai M. Josuttis, so one would like to think it would work.

Changing printWithPrefix()to accept two std::string arguments gives:

    for_each( col1.begin(), col1.end(), bind2nd( mem_fun_ref( &Person::printWithPrefix ), "person: ", "abc" ) );

d:\libs\tests\teststl.cpp(71) : error C2784: 'class std::mem_fun_ref_t<_R,_Ty> __cdecl std::mem_fun_ref(_R (__thiscall _Ty::*)(void))' : could not deduce template argument for '<Unknown>' from 'int (__thiscall Person::*)(class std::basic_string<char
,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)'
d:\libs\tests\teststl.cpp(71) : error C2780: 'class std::binder2nd<_Bfn> __cdecl std::bind2nd(const _Bfn &,const _Ty &)' : expects 2 arguments - 3 provided
        g:\program files\microsoft visual studio\vc98\include\functional(189) : see declaration of 'bind2nd'


I'm not sure if you are right about bind2nd(), but having not used this before anything is possible. I just tried bind1st to no avail.

Neville Franks, Author of ED for Windows. www.getsoft.com
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 
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 

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.