
boost使用
文章平均质量分 54
FanTasyCC
这个作者很懒,什么都没留下…
展开
-
下载安装boost(基于vc)
<br />1.下载boost_1_43_0.zip(具体到哪里下载,自己搞定)<br />2.解压boost_1_43_0.zip(我的是直接解压放在F盘)<br />3.启动vc的Command Prompt编译生成bjam.exe<br />cmd到F:/boost_1_43_0/tools/jam/src下, 输入:<br />build.bat vc8(我的是vs2005自然就是vc8)<br />编译完成后可以在F:/boost_1_43_0/tools/jam/src/bin.ntx86目录下原创 2010-07-16 21:54:00 · 1706 阅读 · 0 评论 -
boost库之shared_ptr
// shared_ptr_Exam.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include using namespace std; #include "boost/smart_ptr.hpp" using namespace boost;原创 2012-05-05 17:24:28 · 1425 阅读 · 0 评论 -
boost库之scoped_ptr
scoped:范围的意思// scoped_ptr_Exam.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include using namespace std; #include "boost/smart_ptr.hpp" using namespa原创 2012-05-05 16:26:57 · 973 阅读 · 0 评论 -
boost库之时间处理(timer,progress_timer, progress_display)
1.timer #include "stdafx.h" #include #include "boost/timer.hpp" //using namespace boost; int _tmain(int argc, _TCHAR* argv[]) { boost::timer t; std::cout << t.elapsed_max() << std::endl; //可度量的原创 2012-05-04 20:35:38 · 2388 阅读 · 0 评论 -
boost库之date
1.date// date_Exam.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #define BOOST_DATE_TIME_SOURCE #include "libs/date_time/src/gregorian/greg_names.hpp" #原创 2012-05-05 12:07:31 · 2973 阅读 · 0 评论 -
boost库之scoped_array
// scoped_array_Exam.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "boost/smart_ptr.hpp" using namespace boost; int _tmain(int argc, _TCHAR* argv[]) {原创 2012-05-05 16:55:59 · 844 阅读 · 0 评论 -
boost之lexical_cast使用
安全从数字字符串到整数的转换: #include template bool safe_lexical_cast(const char* str, T& ret_val) { try { ret_val = boost::lexical_cast(str); return true; } catch (boost::bad_lexical_c原创 2015-04-27 14:55:20 · 1789 阅读 · 0 评论