在VC6中使用boost1.33.1的lexical_cast编译不能通过的问题
#include <boost/lexical_cast.hpp>
#include <iostream>
void boost_lexical()
{
using boost::lexical_cast;
int a=10;
double b=20;
a = lexical_cast<int>("123");
b = lexical_cast<double>("123.12");
std::cout<<a<<std::endl;
std::cout<<b<<std::endl;
}
int main()
{
boost_lexical();
return 0;
}
//////////////////////////////////
Compiling...
main.cpp
F:\000\boost\myboost\main.cpp(15) : error C2062: type 'int' unexpected
F:\000\boost\myboost\main.cpp(16) : error C2062: type 'double' unexpected
Error executing cl.exe.
myboost.exe - 2 error(s), 0 warning(s)
////////////////////////////////////////
为什么不能编译通过呢?哪位大大告诉一生?
我的环境:VC6+SP6+WINXPSP2
另:boost的包含路径已经配置好了的