Tuesday, April 29, 2008

Convert WString to String

std::string WString2String(const std::wstring& str)
{
std::string temp(str.length(), ' ');
std::copy(str.begin(), str.end(), temp.begin());
return temp;
}

No comments: