c++ STL学习
i7891090
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
c++11实现线程池
共享队列的实现 /*** *泛型的 *共享队列 * */ #include <iostream> #include <mutex> #include <condition_variable> #include <list> using namespace std; template<typename _T> class...原创 2020-03-06 15:02:24 · 182 阅读 · 0 评论 -
STL学习之string类
1.string 与char *的相互转化 char * to string 可通过构造函数直接转化 string s1 = "123456"; string to char *,可通过string类的c_str()函数获得char *的地址 const char *str = s1.c_str(); 如下: ·void main1()·{ ·strin原创 2017-10-23 19:48:17 · 215 阅读 · 0 评论 -
STL 学习之vector测试
vector 是向量数组,一端开口的数组,其内存结构图如下所示 可见其在尾部插入数据速度很快,而在其他地方插入数据将会很慢 void testVector() { char buf[10] = { 0 }; vector<string> test_vec; clock_t timeStart = clock(); for(l...原创 2018-12-02 17:43:52 · 723 阅读 · 0 评论
分享