摘要: C++移动构造函数以及move语句简单介绍 首先看一个小例子: 结果为: 结果为: 这两个小程序唯一的不同是调用vc.push_back()将字符串插入到容器中去时,第一段代码使用了move语句,而第二段代码没有使用move语句。输出的结果差异也很明显,第一段代码中,原来的字符串st已经为空,而第二 阅读全文
posted @ 2017-09-28 15:56 青儿哥哥 阅读(46407) 评论(10) 推荐(42) 编辑
摘要: pthread和semaphore的简单应用以及四个典型的多线程问题 pthread常用函数简单介绍 创建线程 int pthread_create(pthread_t * thread, pthread_attr_t * attr, void * (*start_routine)(void *), 阅读全文
posted @ 2017-09-28 10:00 青儿哥哥 阅读(7936) 评论(0) 推荐(3) 编辑