SyntaxFix
Write A Post
Hire A Developer
Questions
Well, the best way is to use the following constructor:
template<class InputIterator> string (InputIterator begin, InputIterator end);
which would lead to something like:
std::vector<char> v; std::string str(v.begin(), v.end());