相当于atio,aof.
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
#include <boost\lexical_cast.hpp>
using namespace boost;
int _tmain(int argc, _TCHAR* argv[])
{
int i = 888;
string str = "999";
i = boost::lexical_cast<int>(str);
cout << i << endl;//输出整数:999
str = "123.123";
float f = boost::lexical_cast<float>(str);
cout << f << endl;//输出浮点数: 123.123
getchar();
return 0;
}