- 博客(3)
- 收藏
- 关注
转载 volotile关键字
原文:https://www.cnblogs.com/yc_sunniwell/archive/2010/07/14/1777432.html1. 为什么用volatile? C/C++ 中的 volatile 关键字和 const 对应,用来修饰变量,通常用于建立语言级别的 memory barrier。这是 BS 在 "The C++ Programming Language" 对 vo...
2018-03-19 23:05:13
614
原创 C++中STL容器set的应用
Set的简单应用set为C++的一种标准关联容器,掌握其使用能大大方便理解和简化C++的编程。set包含的头文件 #include<iostream>set的基本常用操作使用时注意包含头文件<set> std::set and std::multiset associative containers s.begin() 返回set容器的第一个元素 s....
2018-02-27 18:21:29
477
原创 多线程的输出
#include #include #include #include #include using namespace std; condition_variable cond; mutex ml; int loop; int flag=0; void Fun(int id) { for(int i=0;i {
2017-08-31 23:25:06
332
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人