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

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

c# - Call function from DLL -