摘要:
#include <iostream>#include <string>#include <boost/lexical_cast.hpp>using namespace std;using namespace boost;int main(){ string i; try { i=lexical_cast<string>(123.134); } catch(bad_lexical_cast&e) { cout<<e.what()<<endl; return 1; } cout<<i<<end 阅读全文