OSDN Git Service

Apply suggestions from code review
authorJacob Zhong <zyxin@umich.edu>
Thu, 5 Sep 2019 02:43:40 +0000 (22:43 -0400)
committerGitHub <noreply@github.com>
Thu, 5 Sep 2019 02:43:40 +0000 (22:43 -0400)
Co-Authored-By: ouuan <y___o___u@126.com>
docs/lang/csl/container.md
docs/lang/csl/iterator.md
docs/lang/op.md

index 366a764..1b1bc81 100644 (file)
@@ -17,7 +17,7 @@
 -    **映射** ( `map` ) 由 {键,值} 对组成的集合,以某种比较键大小关系的谓词进行排列。
 -    **多重映射** ( `multimap` ) 由 {键,值} 对组成的多重集合,亦即允许键有相等情况的映射。
 
-???+note 什么是谓词( [ **Predicate** ](https://en.wikipedia.org/wiki/Predicate_(mathematical_logic)) )?
+???+note "什么是谓词 ( [ **Predicate** ](https://en.wikipedia.org/wiki/Predicate_(mathematical_logic)) )?"
     谓词就是返回值为真或者假的函数。STL 容器中经常会使用到谓词,用于模板参数。
 
 ### 无序(关联式)容器
index 2a5673b..7db24bb 100644 (file)
@@ -8,7 +8,7 @@
 ```cpp
 vector<int> data(10);
 
-for (int i = 0; i < 10; i++) cout << data[i] << endl;  // 使用下标访问元素
+for (int i = 0; i < data.size(); i++) cout << data[i] << endl;  // 使用下标访问元素
 
 for (vector<int>::iterator iter = data.begin(); iter != data.end(); iter++)
   cout << *iter << endl;  // 使用迭代器访问元素
index ceaea99..70f3234 100644 (file)
@@ -12,7 +12,7 @@ author: Ir1d, aofall
 |  `+` (双目) | 加法  |
 |  `-` (双目) | 减法  |
 
-??? note“单目与双目运算符”
+??? note "单目与双目运算符"
     单目运算符(又称一元运算符)指被操作对象只有一个的运算符,而双目运算符(又称二元运算符)的被操作对象有两个。例如 `1+2` 中加号就是双目运算符,它有 `1` 和 `2` 两个被操作数。此外 C++ 中还有唯一的一个三目运算符 `?:` 。
 
 算术运算符中有两个单目运算符(正、负)以及五个双目运算符(乘法、除法、取模、加法、减法),其中单目运算符的优先级最高。