摘要:
lexical_cast 字面量转换:#include <iostream>#include <boost/lexical_cast.hpp>#include <string>int main(){ int i = 0; try{ i = boost::lexical_cast<int>("100L"); //可能会抛出 bad_lexical_cast 异常 }catch(boost::bad_lexical_cast& e) { std::cout<<e.what()<<std::endl; 阅读全文
posted @ 2012-10-19 10:15
轻典
阅读(868)
评论(0)
推荐(0)