Click here to Skip to main content
15,895,192 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
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 
GeneralRe: std::mem_fun / std::mem_fun1 / for_each / member functions Pin
Malcolm Smart12-Mar-06 6:44
Malcolm Smart12-Mar-06 6:44 
Not meaning to sound ungrateful, I am grateful, always for the time CPians give, but I don't want to call a member of the contained object. I don't want to use a functor. I don't want to use a static member function. I want to use a member of the class that invokes the for_each.

class MyClass
{
public:
   void DoSomethingWithString( std::String *ptrToString() 
      {std::cout << ptrToString;}
  
   void LookThroughContainer( std::vector &c)
   {
      for_each(c.begin() , c.end() , /* this->DoSomethingWithString */);
   }
};


Just call the MyClass::DoSomethingWithString member for each element in a container from MyClass::LookThroughContainer. I *KNOW* this isn't the best way to do this, functors are, but I want to know a) IF you can do it and b) HOW you can do it.

Thanks again for all your time


Regards

Rose | [Rose] Angel Rose | [Rose]

*********************************************
The sooner you fall behind, the longer you have to catch up.
AnswerCurry anyone? Pin
Stephen Hewitt12-Mar-06 18:22
Stephen Hewitt12-Mar-06 18:22 
GeneralMadras Pin
Malcolm Smart12-Mar-06 21:27
Malcolm Smart12-Mar-06 21:27 
GeneralRe: Curry anyone? Pin
Rob Caldecott13-Mar-06 21:15
Rob Caldecott13-Mar-06 21:15 
GeneralRe: Curry anyone? Pin
Stephen Hewitt13-Mar-06 22:00
Stephen Hewitt13-Mar-06 22:00 
GeneralRe: Curry anyone? Pin
Rob Caldecott13-Mar-06 22:35
Rob Caldecott13-Mar-06 22:35 
GeneralBoodt to the recsue! Pin
Rob Caldecott13-Mar-06 22:39
Rob Caldecott13-Mar-06 22:39 
GeneralRe: Boodt to the recsue! Pin
Stephen Hewitt13-Mar-06 22:41
Stephen Hewitt13-Mar-06 22:41 
QuestionPassing information to propretypage Pin
shaohao10-Mar-06 3:20
shaohao10-Mar-06 3:20 
AnswerRe: Passing information to propretypage Pin
Michael Dunn10-Mar-06 6:44
sitebuilderMichael Dunn10-Mar-06 6:44 
QuestionImplementing MDI in an ActiveX control Pin
zulat10-Mar-06 0:02
zulat10-Mar-06 0:02 
Question[Message Deleted] Pin
Igor Mihailov9-Mar-06 10:02
Igor Mihailov9-Mar-06 10:02 
AnswerRe: WTL: Unresolved externals Pin
Jörgen Sigvardsson9-Mar-06 10:33
Jörgen Sigvardsson9-Mar-06 10:33 
GeneralRe: WTL: Unresolved externals Pin
Igor Mihailov9-Mar-06 10:54
Igor Mihailov9-Mar-06 10:54 
QuestionHow to delete/destroy modeless dlg/sheet Pin
shaohao9-Mar-06 4:33
shaohao9-Mar-06 4:33 
AnswerRe: How to delete/destroy modeless dlg/sheet Pin
Justin Tay9-Mar-06 7:28
Justin Tay9-Mar-06 7:28 
GeneralRe: How to delete/destroy modeless dlg/sheet Pin
shaohao10-Mar-06 1:35
shaohao10-Mar-06 1:35 
GeneralRe: How to delete/destroy modeless dlg/sheet Pin
Justin Tay10-Mar-06 1:51
Justin Tay10-Mar-06 1:51 

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.