c++ - how to use ordinary function with boost::bind -


I have two vectors, I would like to copy the vector elements with another change in the second, something like this:

  void addend (std :: string & amp; a, const std :: string & amp; b) {a.append (b); } Std :: vector & lt; Std :: string & gt; V1; Std :: vector & lt; Std :: string & gt; V2; ... std :: conversion (v1.begin (), v1.end (), v2.begin (), boost :: tie (attachment, std :: string ("b")));   

How can I do this?

I will do something like this (cuff off):

  For (string & s: v1) {s.append ("b"); } V2 = v1;   

Easy to write, easy to understand, Easy to optimize compiler, SO question is not required.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -