# learn_cpp **Repository Path**: chunyisong/learn_cpp ## Basic Information - **Project Name**: learn_cpp - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-03 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Learn_C > c语言学习《c++ primer第五版》 > 参考 https://github.com/huangmingchuan/Cpp_Primer_Answers/blob/master/README.md --------- # Chapter_0. c++ 概述 - [x] [1. c++ 概述](https://www.zybuluo.com/zzzxxxyyy/note/1230950) -------- ----------- # Chapter_1. [c++ 基本](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_1/README.md) - [x] [1. 编译和运行](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_1/1.1%20%E7%BC%96%E8%AF%91%E8%BF%90%E8%A1%8C%E7%A8%8B%E5%BA%8F.md)-------[问题解决](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_1/1.1g++%E7%BC%96%E8%AF%91%E9%94%99%E8%AF%AF%E8%A7%A3%E5%86%B3.md) - [x] [2. 预处理器](https://www.zybuluo.com/zzzxxxyyy/note/1231193) - [x] [3. 输入输出](https://www.zybuluo.com/zzzxxxyyy/note/1231444)-----[code](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_1/io.cpp) - [ ] [4.循环 if while for]()-------[code](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_1/io_uncertain.cpp) - [x] [5. 内置数组数据类型](https://www.zybuluo.com/zzzxxxyyy/note/1231553) - [x] [6.类_c++特性](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_1/1.3%E7%B1%BB_c%2B%2B%E7%89%B9%E6%80%A7.md) ------[类io特性code](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_1/salesiterm_io.cpp)------[类加减特性code](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_1/salesiterm_add.cpp)--------[类function特性code](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_1/salesitem_func.cpp) ------------ ---------- # Chapter_2. [变量和基本类型](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_2/README.md) ### [2-1.基本内置类型](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_2/2.1%E5%9F%BA%E6%9C%AC%E5%86%85%E7%BD%AE%E7%B1%BB%E5%9E%8B.md) ### [2-2.变量](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_2/2.2%E5%8F%98%E9%87%8F.md) ### 2-3.复合类型 #### [2-3-1 复合类型-引用](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_2/2.3%E5%A4%8D%E5%90%88%E7%B1%BB%E5%9E%8B.md) #### [2-3-2 复合类型-指针](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_2/2.3%E5%A4%8D%E5%90%88%E7%B1%BB%E5%9E%8B-%E6%8C%87%E9%92%88.md) ------------- ### [2-4.const 限定符](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_2/2.4const%E9%99%90%E5%AE%9A%E7%AC%A6.md) ### [2-5.处理类型](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_2/2.5%E5%A4%84%E7%90%86%E7%B1%BB%E5%9E%8B.md) ### 2-6.自定义数据结构 #### [2-6-1 概览](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_2/2.6%E8%87%AA%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B.md) #### [2-6-2 实例sales_data类 code](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_2/sales_data2.cpp) ----------- ----------- # Chapter_3. [字符串,向量和数组](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/README.md) ### [3-1 命名空间的using声明](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.1%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4%E7%9A%84using%E5%A3%B0%E6%98%8E.md) ### 3-2 标准类型库 string #### [3-2-1 string 初始化](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.2-1%E6%A0%87%E5%87%86%E5%BA%93%E7%B1%BB%E5%9E%8Bstring%E5%88%9D%E5%A7%8B%E5%8C%96.md) #### [3-2-2 sting 对象操作](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.2-2%E6%A0%87%E5%87%86%E5%BA%93%E7%B1%BB%E5%9E%8Bstring(string%E5%AF%B9%E8%B1%A1%E6%93%8D%E4%BD%9C).md)----code: [1输入输出 --](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/string_io2.cpp) [2.输入不确定字符--](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/string_io3_uncertain.cpp) [3. getline](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/string_getline.cpp) #### [3-2-3 string 字符串操作](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.2-3%E6%A0%87%E5%87%86%E5%BA%93%E7%B1%BB%E5%9E%8Bstring(stringstring%E5%AF%B9%E8%B1%A1%E5%AD%97%E7%AC%A6%E6%93%8D%E4%BD%9C).md)-----code: [1计数 --](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/string_for2.cpp)[2.改变大写(引用)--](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/string_for_change.cpp)[3.下标循环](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/string_subscript_iteration.cpp) ### 3-3 标准库类型 vector #### [3-3-1 vector定义和初始化](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.3-1%E6%A0%87%E5%87%86%E5%BA%93%E7%B1%BB%E5%9E%8Bvector%E5%88%9D%E5%A7%8B%E5%8C%96.md) #### [3-3-2 vector操作](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.3-2%E6%A0%87%E5%87%86%E5%BA%93%E7%B1%BB%E5%9E%8Bvector%E6%93%8D%E4%BD%9C.md)--------code:[1.push_back函数--](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/vector_test.cpp)[2. for 循环调用--](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/vector_test3.cpp)[3.下标调用--](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/vector_subscipt.cpp) #### [3-3-3 vector 习题](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.3-3%E6%A0%87%E5%87%86%E5%BA%93%E7%B1%BB%E5%9E%8Bvector%E4%B9%A0%E9%A2%98.md) ### 3-4 迭代器 Iteractor #### [3-4-1 迭代器的定义和使用](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.4Iterator/3.4-1%E8%BF%AD%E4%BB%A3%E5%99%A8%E7%9A%84%E4%BD%BF%E7%94%A8.md) #### [3-4-2 迭代器的运算](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.4Iterator/3.4-2%E8%BF%AD%E4%BB%A3%E5%99%A8%E7%9A%84%E8%BF%90%E7%AE%97.md)-----------[应用-----二分搜索code](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.4Iterator/iterator_binary_search.cpp) #### [3-4-3 迭代器习题](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.4Iterator/3.4-3%E8%BF%AD%E4%BB%A3%E5%99%A8%E7%9A%84%E4%B9%A0%E9%A2%98.md) ### 3-5 数组 Array #### [3-5-1 定义和初始化数组](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.5Array/3.5-1%E5%AE%9A%E4%B9%89%E5%92%8C%E5%88%9D%E5%A7%8B%E5%8C%96%E6%95%B0%E7%BB%84.md) #### [3-5-2 访问数组元素 ](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.5Array/3.5-2%E8%AE%BF%E9%97%AE%E6%95%B0%E7%BB%84%E5%85%83%E7%B4%A0.md) #### [3-5-3 指针和数组](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.5Array/3.5-3%E6%8C%87%E9%92%88%E5%92%8C%E6%95%B0%E7%BB%84.md) #### [3-5-4 c风格字符串](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.5Array/3.5-4c%E9%A3%8E%E6%A0%BC%E5%AD%97%E7%AC%A6%E4%B8%B2.md) #### [3-5-5 数组习题]() ### 3-6 多维数组 #### [3-6-1 定义和初始化](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.6multidimension_array/3.6-1%E5%AE%9A%E4%B9%89%E5%92%8C%E5%88%9D%E5%A7%8B%E5%8C%96.md) #### [3-6-2 访问多维数组](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_3/3.6multidimension_array/3.6-2%E5%A4%9A%E7%BB%B4%E6%95%B0%E7%BB%84%E7%9A%84%E4%BD%BF%E7%94%A8.md) #### [3-6-3 多维数组习题]() -------------------------- ------------------------ # Chapter_4. [表达式 : 运算符](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_4/README.md) ### [4.1表达式基础](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_4/4.1%E8%A1%A8%E8%BE%BE%E5%BC%8F%E5%9F%BA%E7%A1%80.md) ### [4.2算术运算符](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_4/4.2%E7%AE%97%E6%9C%AF%E8%BF%90%E7%AE%97%E7%AC%A6.md) ### [4.3逻辑和关系运算符](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_4/4.3%E9%80%BB%E8%BE%91%E5%92%8C%E5%85%B3%E7%B3%BB%E8%BF%90%E7%AE%97%E7%AC%A6.md) ### [4.4赋值运算符](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_4/4.4%E8%B5%8B%E5%80%BC%E8%BF%90%E7%AE%97%E7%AC%A6.md) ### [4.5递增运算符](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_4/4.5%E9%80%92%E5%A2%9E%E8%BF%90%E7%AE%97%E7%AC%A6.md) ### [4.6成员访问运算符](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_4/4.6%E6%88%90%E5%91%98%E8%AE%BF%E9%97%AE%E8%BF%90%E7%AE%97%E7%AC%A6.md) ### [4.7条件运算符](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_4/4.7%E6%9D%A1%E4%BB%B6%E8%BF%90%E7%AE%97%E7%AC%A6.md) ### [4.8位运算符](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_4/4.8%E4%BD%8D%E8%BF%90%E7%AE%97%E7%AC%A6.md) ### [4.9sizeof运算符](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_4/4.9sizeof%E8%BF%90%E7%AE%97%E7%AC%A6.md) ### [4.10逗号运算符](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_4/4.10%E9%80%97%E5%8F%B7%E8%BF%90%E7%AE%97%E7%AC%A6.md) ### [4.11类型转换](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_4/4.11%E7%B1%BB%E5%9E%8B%E8%BD%AC%E6%8D%A2.md) ### [4.12运算符优先级](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_4/4.12%E8%BF%90%E7%AE%97%E7%AC%A6%E4%BC%98%E5%85%88%E7%BA%A7.md) ---------------------- --------------------- # Chapter_5 [语句](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_5/README.md) ### [5.1简单介绍语句](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_5/5.1%E7%AE%80%E5%8D%95%E4%BB%8B%E7%BB%8D%E8%AF%AD%E5%8F%A5.md) ### [5.2条件语句](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_5/5.2%E6%9D%A1%E4%BB%B6%E8%AF%AD%E5%8F%A5.md) ### [5.3迭代语句](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_5/5.3%E8%BF%AD%E4%BB%A3%E8%AF%AD%E5%8F%A5.md) ### [5.4跳转语句](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_5/5.4%E8%B7%B3%E8%BD%AC%E8%AF%AD%E5%8F%A5.md) ### [5.5try语句块和异常处理](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_5/5.5try%E8%AF%AD%E5%8F%A5%E5%9D%97%E5%92%8C%E5%BC%82%E5%B8%B8%E5%A4%84%E7%90%86.md) ### [语句习题](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_5/5.%E8%AF%AD%E5%8F%A5%E7%BB%83%E4%B9%A0%E9%A2%98.md) ------------ ----------- # Chapter_6 [函数](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/README.md) ### 6-1 函数基础 #### [6-1-1 函数基本](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.1foundation/6.1.1%E5%87%BD%E6%95%B0%E5%9F%BA%E6%9C%AC.md) #### [6-1-2 局部对象](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.1foundation/6.1.2%E5%B1%80%E9%83%A8%E5%AF%B9%E8%B1%A1.md) #### [6-1-3 函数声明](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.1foundation/6.1.3%E5%87%BD%E6%95%B0%E5%A3%B0%E6%98%8E.md) #### [6-1-4 分离式编译](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.1foundation/6.1.4%E5%88%86%E7%A6%BB%E5%BC%8F%E7%BC%96%E8%AF%91.md) #### [6-1 习题](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.1foundation/6-1%20%E4%B9%A0%E9%A2%98.md) ### 6-2 函数传值 #### [6-2-1传值参数](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.2ParameterPassing/6.2.1%E4%BC%A0%E5%80%BC%E5%8F%82%E6%95%B0.md) #### [6-2-2传引用参数](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.2ParameterPassing/6.2.2%E4%BC%A0%E5%BC%95%E7%94%A8%E5%8F%82%E6%95%B0.md) #### [6-2-3const形参和实参](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.2ParameterPassing/6.2.3const%E5%BD%A2%E5%8F%82%E5%92%8C%E5%AE%9E%E5%8F%82.md) #### [6-2-4数组形参](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.2ParameterPassing/6.2.4%E6%95%B0%E7%BB%84%E5%BD%A2%E5%8F%82.md) #### [6-2-6含有可变形参的函数](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.2ParameterPassing/6.2.6%E5%90%AB%E6%9C%89%E5%8F%AF%E5%8F%98%E5%BD%A2%E5%8F%82%E7%9A%84%E5%87%BD%E6%95%B0.md) #### [6-2 习题](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.2ParameterPassing/6-2%E4%B9%A0%E9%A2%98.md) ### 6-3 返回表达式 #### [6-3-1无返回值函数](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.3Return-Expression/6-3-1%E6%97%A0%E8%BF%94%E5%9B%9E%E5%80%BC%E5%87%BD%E6%95%B0.md) #### [6-3-2有返回值函](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.3Return-Expression/6-3-2%E6%9C%89%E8%BF%94%E5%9B%9E%E5%80%BC%E5%87%BD%E6%95%B0.md) #### [6-3-3返回数组指针](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.3Return-Expression/6.3.3%E8%BF%94%E5%9B%9E%E6%95%B0%E7%BB%84%E6%8C%87%E9%92%88.md) ### 6-4 函数重载 #### [6-4-1重载函数](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.4Overloaded/6-4-1%E9%87%8D%E8%BD%BD%E5%87%BD%E6%95%B0.md) #### [6-4-2重载于作用域](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.4Overloaded/6-4-2%E9%87%8D%E8%BD%BD%E4%BA%8E%E4%BD%9C%E7%94%A8%E5%9F%9F.md) ### 6-5 语言特性 #### [6-5-1默认实参](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.5Language-Characteristics/6-5-1%E9%BB%98%E8%AE%A4%E5%AE%9E%E5%8F%82.md) #### [6-5-2内联函数](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.5Language-Characteristics/6-5-2%E5%86%85%E8%81%94%E5%87%BD%E6%95%B0.md) #### [6-5-3Constexpr函数](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.5Language-Characteristics/6-5-3Constexpr%E5%87%BD%E6%95%B0.md) #### [6-5-4调试代码](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.5Language-Characteristics/6-5-3%E8%B0%83%E8%AF%95%E4%BB%A3%E7%A0%81.md) #### [6-5 习题](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.5Language-Characteristics/func-exercise6-47.cpp) ### 6-6 函数匹配 #### [6-6-1函数匹配](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.6func-Match/6-6-1%E5%87%BD%E6%95%B0%E5%8C%B9%E9%85%8D.md) #### [6-6-2实参类型转换](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.6func-Match/6-6-2%E5%AE%9E%E5%8F%82%E7%B1%BB%E5%9E%8B%E8%BD%AC%E6%8D%A2.md) #### [6-6 习题](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.6func-Match/README.md) ### 6-7 函数指针 #### [6-7-1 函数指针](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.7func-pointer/%E5%87%BD%E6%95%B0%E6%8C%87%E9%92%88.md) #### [习题 6-57](https://github.com/LiuChuang0059/learn_cpp/blob/master/chapter_6/6.7func-pointer/func-exercise6-57.cpp)