$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Thomas Gulbrandsen (thomas_at_[hidden])
Date: 2006-03-21 11:29:59
Hello!
I have to convert a std::wstring to a std::string and tried the following
small test program.
#include <iostream>
#include <string>
#include <boost/lexical_cast.hpp>
int main(int argc, char** argv)
{
std::wstring ws(L"Hello");
std::string s(boost::lexical_cast<std::string>(ws);
std::cout << s << std::endl;
return 0;
}
But this will not compile on MSVC8.0 or MSVC7.1.
Is the boost::lexical_cast suppost to handle this conversion?
Thanks,
Thomas Gulbrandsen