升压最常用的部位 [英] Most used parts of Boost

查看:153
本文介绍了升压最常用的部位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我发现<一个href=\"http://www.boost.org/doc/libs/1_47_0/libs/conversion/lexical_cast.htm\"><$c$c>boost::lexical_cast我心想:我为什么不知道这个越快! - 我讨厌不得不写code像

When I discovered boost::lexical_cast I thought to myself "why didn't I know about this sooner!" - I hated having to write code like

stringstream ss;
ss << anIntVal;
mystring = ss.str();

现在我写

mystring = boost::lexical_cast<string>(anIntVal);

昨天,计算器,我碰到提升分裂(另一颗宝石,将节省我写code)。

Yesterday, on stackoverflow, I came across boost split (another gem that will save me writing code).

string stringtobesplit = "AA/BB-CC")
vector<string> tokens;

boost::split(tokens, stringtobesplit, boost::is_any_of("/-")); 
// tokens now holds 3 items: AA BB CC

我要开始寻找通过Boost文档寻找其他的功能,我就可以经常使用,但我觉得这会很容易错过的东西。

I am going to start looking through boost documentation looking for other functions that I will be able to use regularly, but I feel that it will be very easy to miss things.

你用什么提升作用最为/会讨厌不呢?

What boost functions do you use most / would hate not to have?

推荐答案

可能提振对我来说是最常用的部分是的的boost :: shared_ptr的

Probably the most used part of boost for me is boost::shared_ptr.

这篇关于升压最常用的部位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆