std
::wstring s2ws
(const std
::string& s
)
{
std
::wstring temp
(s.
length(),L
‘ ‘);
std
::copy(s.
begin(), s.
end(), temp.
begin());
return temp
;
}
std::string ws2s(const std::wstring& s)
{
std::string temp(s.length(), ‘ ‘);
std::copy(s.begin(), s.end(), temp.begin());
return temp;
}
Update: 好心人提供的文章
八月 29th, 2008 | Tags: c++ | Category: Programming | Comments (14)