string - Varying argument values and number -- is this legal C++? -
I am trying to declare the following two functions to keep a token string back together (one vector or other Iterator-compatible data structure):
std :: string composeTokens (std :: vector & lt; std :: string & gt; token); Std :: string ComposeTokens (std :: iterator first, std :: iterator last); In the implementation file (not available here - it is quite obvious), as the Intelalex validity of Visual Studio is not validating either implementation, saying that both announcements With both disputes. Compiling creates a message that the itater should have a template.
What am I trying to do, here? Is this etter and lt; String & gt; Do I need a prompt, etc.? And what is STL or Boost or some other library already done?
You can use:
#include & lt; Algorithm & gt; # Include & lt; Vector & gt; #include & lt; String & gt; # Include & lt; Iostream & gt; Int main () {std :: vector & lt; Std :: string & gt; V {"put", "me", "together"}; Std :: cout & lt; & Lt; Std :: Deposit (v.begin (), v.end (), std :: string ()) & lt; & Lt; Std :: endl; }
Comments
Post a Comment