2008/7/6 Sean Farrow
Hi: What is the best way (in terms of efficiency) to convert an std::vector of wchar_t to std::wstring. I can think of a oupple of aproaches: 1. using std::copy. 2. using boost::lexical_cast. 3 using boost::foreach 4. Usin he boost::serialization library.
I suspect 5. None of the above. The quickest and most efficent way to switch between two containers which contain the same type is: new_container container(old_container.begin(), old_container.end() ) so in this case: wstring my_string(v.begin(), e.end());
The std::wstring doesn't ned to be output to a file. Any advice apreciated. Sean.
__________ Information from ESET NOD32 Antivirus, version of virus signature database 3244 (20080705) __________
The message was checked by ESET NOD32 Antivirus.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users