上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 66 下一页
摘要: #include #include #include #include boost::atomic_int producer_count(0);boost::atomic_int consumer_count(0);boost::lockfree::queue queue(128);//无锁的多生产... 阅读全文
posted @ 2014-07-06 21:36 zzyoucan 阅读(4030) 评论(0) 推荐(0) 编辑
摘要: 只作了解,要想深入可以http://www.cnblogs.com/haippy/p/3252056.html看个最简单的例子#include #include #include #include #include using namespace std;boost::atomic_int a ;/... 阅读全文
posted @ 2014-07-06 12:53 zzyoucan 阅读(2501) 评论(0) 推荐(0) 编辑
摘要: #include // std::cout#include // std::thread#include // std::mutex, std::unique_lock#include // st... 阅读全文
posted @ 2014-07-06 11:03 zzyoucan 阅读(257) 评论(0) 推荐(0) 编辑
摘要: #include // std::cout#include // std::thread, std::this_thread::yield#include // std::mutex, std::uniq... 阅读全文
posted @ 2014-07-06 10:42 zzyoucan 阅读(215) 评论(0) 推荐(0) 编辑
摘要: c++这头烈马,我定将你驯服! 阅读全文
posted @ 2014-07-06 10:23 zzyoucan 阅读(111) 评论(0) 推荐(0) 编辑
摘要: #include // std::cout#include // std::thread#include // std::mutex, std::unique_lock#include // st... 阅读全文
posted @ 2014-07-06 10:09 zzyoucan 阅读(538) 评论(0) 推荐(1) 编辑
摘要: 想我什么时候c++,c用的时候可以顺手拈来,不在为c++,c那些基础的东西困扰,像经理说的样,看程序就像看小说一样,到那时可以说已经跳过了初级程序员的过程了。要多加练习,多想想,有没有更好的方法,更有效率的方法。 阅读全文
posted @ 2014-07-01 23:08 zzyoucan 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 上次看到这个有点晕了,其实这个vector保存的是std::vector#include #include using namespace std;int main(){ std::vector > num; std::vector a(10, 5); num.push_back(... 阅读全文
posted @ 2014-07-01 23:01 zzyoucan 阅读(3615) 评论(0) 推荐(1) 编辑
摘要: #include using namespace std;int main(){ //1.const_cast //const int a = 10; //int* ptr = const_cast(&a);//将const属性去除 //*ptr = 100; //2.... 阅读全文
posted @ 2014-06-30 11:14 zzyoucan 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 本来看看return到底做了什么结果看了这个复制构造函数,复制构造函数调用的场合如下:• 根据另一个同类型的对象显式或隐式初始化一个对象。• 复制一个对象,将它作为实参传给一个函数。//传递实参的副本时会调用• 从函数返回时复制一个对象。//return返回一个副本时会调用• 初始化顺序容器中的元素... 阅读全文
posted @ 2014-06-29 13:41 zzyoucan 阅读(146) 评论(0) 推荐(0) 编辑
上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 66 下一页