I've been reading Accelerated C++ and I have to say it's an interesting book.
In chapter 6, I have to use a function from <algorithm> to concatenate from a vector<string> into a single string. I could use accumulate, but it doesn't help because string containers can only push_back characters.
int main () {
using namespace std;
string str = "Hello, world!";
vector<string> vec (10, str);
// Concatenate here?
return 0;
}
How do I join the strings together?
See Question&Answers more detail:os