|
Boost Users : |
From: Miro Jurisic (macdev_at_[hidden])
Date: 2004-04-30 18:32:41
In article <CLEKIHLHCHBBNPGGHFMBKEHBCIAA.tony_at_[hidden]>,
"Tony Djordjevski" <tony_at_[hidden]> wrote:
> I'm using Boost 1.31.0 with VC++ 7.1 and I'm having some problems converting
> std::string to std::wstring and back.
You can't do that. lexical_cast from X to Y requires that there is a stream to
which X can be written and from which Y can be read. However, string can only be
read from basic_stream<char> and wstring can only be written to
basic_stream<wchar_t>.
However, if you add an operator that can read a wstring from a stream<char>, and
one that can read a string from a stream<wchar_t>, then it will work.
hth
meeroh
-- If this message helped you, consider buying an item from my wish list: <http://web.meeroh.org/wishlist>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net