![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
boost 学习笔记
centos-com
忘了近处忘了远处忘了源自何处道无界知识无界你我无界在茫茫宇宙中任何人任何有智慧的物种都可以随意转载和修改但禁止商用.
展开
-
Boost :Lexical_cast
lexical_cast函数本身的代码非常短,如下: templateTarget lexical_cast(Source arg){ detail::lexical_stream interpreter; Target result; if(!(interpreter > result)) throw_exception(bad_l原创 2013-11-24 18:50:08 · 577 阅读 · 0 评论 -
boost/lexical_cast.hpp的简单使用方法
#include lexical_cast.hpp> #include #include int main() { using std::string; using std::cout; using std::endl; int i; try {原创 2013-11-24 18:51:37 · 2490 阅读 · 0 评论 -
boost之format
大纲一个format对象从一个格式化字符串构造,它以重复的%操作符给出参数。接着每个参数转换成字符串,它们被按照格式合成一个字符串。cout << boost::format("writing %1%, x=%2% : %3%-th try") % "toto" % 40.23 % 50;// prints "writing toto, x=40.230 : 50-th try原创 2013-11-30 17:52:46 · 874 阅读 · 0 评论