C++学习资料

很多学生朋友C++掌握的不够扎实,推荐一个免费品质不错的学习网站。

www.learncpp.com


简介/入门
0.1这些教程的介绍
0.2编程语言简介
0.3C/C++ 简介
0.4C++开发简介
0.5编译器、链接器和库简介
0.6安装集成开发环境 (IDE)
0.7编译你的第一个程序
0.8几个常见的 C++ 问题
0.9配置编译器:构建配置
0.10配置编译器:编译器扩展
0.11配置编译器:警告和错误级别
0.12配置编译器:选择语言标准

C++ 基础
1.1语句和程序结构
1.2注释
1.3对象和变量简介
1.4变量赋值和初始化
1.5iostream 简介:cout、cin 和 endl
1.6未初始化的变量和未定义的行为
1.7关键字和命名标识符
1.8空格和基本格式
1.9文字和运算符简介
1.10表达式介绍
1.11开发你的第一个程序
1.x第一章总结与测验

第2章
C++ 基础:函数和文件
2.1功能介绍
2.2函数返回值
2.3函数参数和实参介绍
2.4局部作用域简介
2.5为什么函数有用,以及如何有效地使用它们
2.6前向声明和定义
2.7具有多个代码文件的程序
2.8命名冲突和命名空间介绍
2.9预处理器简介
2.10头文件
2.11头球后卫
2.12如何设计你的第一个程序
2.x第2章总结与测验


第3章
调试 C++ 程序
3.1语法和语义错误
3.2调试过程
3.3调试策略
3.4基本调试策略
3.5更多调试策略
3.6使用集成调试器:步进
3.7使用集成调试器:运行和断点
3.8使用集成调试器:观察变量
3.9使用集成调试器:调用堆栈
3.10在问题变成问题之前发现问题
3.x第三章总结与测验


第 4 章
基本数据类型
4.1基本数据类型简介
4.2空白
4.3对象大小和 sizeof 运算符
4.4有符号整数
4.5无符号整数,以及为什么要避免它们
4.6固定宽度整数和 size_t
4.7科学记数法简介
4.8浮点数字
4.9布尔值
4.10if 语句简介
4.11字符
4.12类型转换和 static_cast 简介
4.13std::string 简介
4.14字面常量
更新
4.15符号常量:const 和 constexpr 变量
更新
4.x第4章总结与测验

第 5 章
运营商
5.1运算符优先级和结合性
5.2算术运算符
5.3模数和指数
5.4递增/递减运算符和副作用
5.5逗号和条件运算符
5.6关系运算符和浮点比较
5.7逻辑运算符
5.x第5章总结与测验


第 O 章
位操作(可选章节)
O.1通过 std::bitset 进行位标志和位操作
O.2位运算符
O.3使用位运算符和位掩码进行位操作
O.4二进制和十进制之间的转换

第 6 章
范围、持续时间和联系
6.1复合语句(块)
6.2用户定义的命名空间和范围解析运算符
6.3局部变量
6.4全局变量介绍
6.5可变阴影(名称隐藏)
6.6内部联动
6.7外部联动
6.8为什么(非常量)全局变量是邪恶的
6.9跨多个文件共享全局常量(使用内联变量)
6.10静态局部变量
6.11范围、持续时间和链接摘要
6.12使用声明和使用指令
6.13未命名和内联命名空间
6.x第6章总结与测验


第七章
控制流和错误处理
7.1控制流程介绍
7.2If 语句和块
7.3常见的 if 语句问题
7.4Switch 语句基础知识
7.5切换失败和范围
7.6转到语句
7.7循环和 while 语句简介
7.8执行 while 语句
7.9对于语句
7.10中断并继续
7.11暂停(提前退出程序)
7.12测试代码简介

7.13代码覆盖率
7.14C++ 中的常见语义错误
7.15检测和处理错误
7.16std::cin 和处理无效输入
7.17断言和静态断言
7.18随机数生成简介
更新
7.19使用 Mersenne Twister 生成随机数
更新
7.x第7章总结与测验
更新

第 8 章
类型转换和函数重载
8.1
隐式类型转换(强制)
8.2
浮点和积分提升
8.3
数值转换
8.4
算术转换
8.5
显式类型转换(强制转换)和 static_cast
8.6
类型定义和类型别名
8.7
使用 auto 关键字对对象进行类型推导
8.8
函数的类型推导
8.9
函数重载介绍
8.10
函数过载区分
8.11
函数重载解析和模糊匹配
8.12
默认参数
8.13
函数模板
8.14
函数模板实例

8.15
具有多种模板类型的函数模板
8.x
第8章总结与测验

1 月 18 日:第 9 章已更新!

第 9 章
复合类型
9.1
复合数据类型简介
更新
9.2
值类别(左值和右值)
更新
9.3
左值引用
更新
9.4
对 const 的左值引用
更新
9.5
通过左值引用传递
更新
9.6
指针简介
更新
9.7
空指针
更新
9.8
指针和常量
更新
9.9
通过地址
更新
9.10
通过地址传递(第 2 部分)
更新
9.11
按引用返回和按地址返回
更新
9.12
使用指针、引用和 const 进行类型推导
新的
9.13
程序定义(用户定义)类型简介
更新
9.14
无范围枚举
更新
9.15
无范围枚举输入和输出
更新
9.16
范围枚举(枚举类)
更新
9.17
结构、成员和成员选择简介
更新
9.18
结构聚合初始化
更新
9.19
默认成员初始化
更新
9.20
结构传递和杂项
更新
9.21
使用指针和引用选择成员
更新
9.x
第9章总结与测验
更新
9.y
使用语言参考
第 10 章
数组、字符串、指针和引用
10.1
数组(第一部分)
10.2
数组(第二部分)
10.3
数组和循环
10.4
使用选择排序对数组进行排序
10.5
多维数组
10.6
C 风格的字符串
10.7
std::string_view 简介
10.8
指针和数组
10.9
指针算术和数组索引
10.10
C 风格的字符串符号常量
10.11
使用 new 和 delete 进行动态内存分配
10.12
动态分配数组
10.13
For-each 循环
10.14
无效指针
10.15
指向指针和动态多维数组的指针
10.16
std::array 简介
10.17
std::vector 简介
10.18
迭代器简介
10.19
标准库算法简介
10.x
第10章综合测验
第11章
职能
11.1
内联函数
11.2
函数指针
11.3
栈和堆
11.4
std::vector 容量和堆栈行为
11.5
递归
11.6
命令行参数
11.7
省略号(以及为什么要避免它们)
11.8
lambda 简介(匿名函数)
11.9
Lambda 捕获
11.x
第11章综合测验

第十二章
基本的面向对象编程
12.1
欢迎来到面向对象编程
12.2
班级和班级成员
12.3
公共与私有访问说明符
12.4
访问函数和封装
12.5
构造函数
12.6
构造函数成员初始化器列表
12.7
非静态成员初始化
12.8
重叠和委托构造函数
12.9
析构函数
12.10
隐藏的“this”指针
12.11
类代码和头文件
12.12
const 类对象和成员函数
12.13
静态成员变量
12.14
静态成员函数
12.15
朋友函数和类
12.16
匿名对象
12.17
类中的嵌套类型
12.18
计时你的代码
12.x
第12章综合测验
第十三章
运算符重载
13.1
运算符重载介绍
13.2
使用友元函数重载算术运算符
13.3
使用普通函数重载运算符
13.4
重载 I/O 操作符
13.5
使用成员函数重载运算符
13.6
重载一元运算符 +、- 和 !
13.7
重载比较运算符
13.8
重载递增和递减运算符
13.9
重载下标运算符
13.10
重载括号运算符
13.11
重载类型转换
13.12
复制构造函数
13.13
复制初始化
13.14
转换构造函数、显式和删除
13.15
重载赋值运算符
13.16
浅拷贝与深拷贝
13.17
重载运算符和函数模板
13.x
第13章综合测验
第十四章
留作未来重组
第15章
留作未来重组
第十六章
对象关系简介
16.1
对象关系
16.2
作品
16.3
聚合
16.4
协会
16.5
依赖项
16.6
容器类
16.7
std::initializer_list
16.x
第16章综合测验
第十七章
遗产
17.1
继承介绍
17.2
C++中的基本继承
17.3
派生类的构造顺序
17.4
派生类的构造函数和初始化
17.5
继承和访问说明符
17.6
向派生类添加新功能
17.7
调用继承的函数和覆盖行为
17.8
隐藏继承的功能
17.9
多重继承
17.x
第17章综合测验

第十八章
虚函数
18.1
指向派生对象基类的指针和引用
18.2
虚函数和多态
18.3
override 和 final 说明符,以及协变返回类型
18.4
虚拟析构函数、虚拟分配和覆盖虚拟化
18.5
早期绑定和后期绑定
18.6
虚拟表
18.7
纯虚函数、抽象基类和接口类
18.8
虚拟基类
18.9
对象切片
18.10
动态铸造
18.11
使用 operator<< 打印继承的类
18.x
第18章综合测验
第十九章
模板和类
19.1
模板类
19.2
模板非类型参数
19.3
函数模板特化
19.4
类模板专业化
19.5
部分模板专业化
19.6
指针的部分模板特化
19.x
第19章综合测验
第20章
例外
20.1
例外的必要性
20.2
基本异常处理
20.3
异常、函数和堆栈展开
20.4
未捕获的异常和包罗万象的处理程序
20.5
异常、类和继承
20.6
重新抛出异常
20.7
功能尝试块
20.8
异常的危险和缺点
20.9
异常规范和 noexcept
20.x
第20章综合测验
第 M 章
移动语义和智能指针
M.1
智能指针和移动语义简介
M.2
R 值参考
M.3
移动构造函数和移动赋值
M.4
标准::移动
M.5
std::move_if_noexcept
M.6
std::unique_ptr
M.7
std::shared_ptr
M.8
std::shared_ptr 和 std::weak_ptr 的循环依赖问题
MX
M章综合回顾
第21章
标准模板库
21.1
标准库
21.2
STL 容器概述
21.3
STL 迭代器概述
21.4
STL 算法概述
第22章
标准::字符串
22.1
std::string 和 std::wstring
22.2
std::string 构造和销毁
22.3
std::string 长度和容量
22.4
std::string 字符访问和转换为 C 样式数组
22.5
std::string 赋值和交换
22.6
std::string 附加
22.7
std::string 插入
第23章
输入和输出 (I/O)
23.1
输入和输出 (I/O) 流
23.2
使用 istream 输入
23.3
使用 ostream 和 ios 输出
23.4
字符串的流类
23.5
流状态和输入验证
23.6
基本文件 I/O
23.7
随机文件 I/O
附录 A
杂项科目
A.1
静态和动态库
A2
在 Visual Studio 中使用库
A.3
使用带有 Code::Blocks 的库
附录 B
C++ 更新
B.1
C++11 简介
B.2
C++14 简介
B.3
C++17 简介
B.4
C++20 简介
附录 C
结束
C.1
结束?


Introduction / Getting Started
0.1
Introduction to these tutorials
0.2
Introduction to programming languages
0.3
Introduction to C/C++
0.4
Introduction to C++ development
0.5
Introduction to the compiler, linker, and libraries
0.6
Installing an Integrated Development Environment (IDE)
0.7
Compiling your first program
0.8
A few common C++ problems
0.9
Configuring your compiler: Build configurations
0.10
Configuring your compiler: Compiler extensions
0.11
Configuring your compiler: Warning and error levels
0.12
Configuring your compiler: Choosing a language standard


Chapter 2
C++ Basics: Functions and Files
2.1
Introduction to functions
2.2
Function return values
2.3
Introduction to function parameters and arguments
2.4
Introduction to local scope
2.5
Why functions are useful, and how to use them effectively
2.6
Forward declarations and definitions
2.7
Programs with multiple code files
2.8
Naming collisions and an introduction to namespaces
2.9
Introduction to the preprocessor
2.10
Header files
2.11
Header guards
2.12
How to design your first programs
2.x
Chapter 2 summary and quiz
Chapter 3
Debugging C++ Programs
3.1
Syntax and semantic errors
3.2
The debugging process
3.3
A strategy for debugging
3.4
Basic debugging tactics
3.5
More debugging tactics
3.6
Using an integrated debugger: Stepping
3.7
Using an integrated debugger: Running and breakpoints
3.8
Using an integrated debugger: Watching variables
3.9
Using an integrated debugger: The call stack
3.10
Finding issues before they become problems
3.x
Chapter 3 summary and quiz
Chapter 4
Fundamental Data Types
4.1
Introduction to fundamental data types
4.2
Void
4.3
Object sizes and the sizeof operator
4.4
Signed integers
4.5
Unsigned integers, and why to avoid them
4.6
Fixed-width integers and size_t
4.7
Introduction to scientific notation
4.8
Floating point numbers
4.9
Boolean values
4.10
Introduction to if statements
4.11
Chars
4.12
Introduction to type conversion and static_cast
4.13
An introduction to std::string
4.14
Literal constants
Updated
4.15
Symbolic constants: const and constexpr variables
Updated
4.x
Chapter 4 summary and quiz

Chapter 5
Operators
5.1
Operator precedence and associativity
5.2
Arithmetic operators
5.3
Modulus and Exponentiation
5.4
Increment/decrement operators, and side effects
5.5
Comma and conditional operators
5.6
Relational operators and floating point comparisons
5.7
Logical operators
5.x
Chapter 5 summary and quiz
Chapter O
Bit Manipulation (optional chapter)
O.1
Bit flags and bit manipulation via std::bitset
O.2
Bitwise operators
O.3
Bit manipulation with bitwise operators and bit masks
O.4
Converting between binary and decimal
Chapter 6
Scope, Duration, and Linkage
6.1
Compound statements (blocks)
6.2
User-defined namespaces and the scope resolution operator
6.3
Local variables
6.4
Introduction to global variables
6.5
Variable shadowing (name hiding)
6.6
Internal linkage
6.7
External linkage
6.8
Why (non-const) global variables are evil
6.9
Sharing global constants across multiple files (using inline variables)
6.10
Static local variables
6.11
Scope, duration, and linkage summary
6.12
Using declarations and using directives
6.13
Unnamed and inline namespaces
6.x
Chapter 6 summary and quiz
Chapter 7
Control Flow and Error Handling
7.1
Control flow introduction
7.2
If statements and blocks
7.3
Common if statement problems
7.4
Switch statement basics
7.5
Switch fallthrough and scoping
7.6
Goto statements
7.7
Intro to loops and while statements
7.8
Do while statements
7.9
For statements
7.10
Break and continue
7.11
Halts (exiting your program early)
7.12
Introduction to testing your code
7.13
Code coverage
7.14
Common semantic errors in C++
7.15
Detecting and handling errors
7.16
std::cin and handling invalid input
7.17
Assert and static_assert
7.18
Introduction to random number generation
Updated
7.19
Generating random numbers using Mersenne Twister
Updated
7.x
Chapter 7 summary and quiz
Updated

Chapter 8
Type Conversion and Function Overloading
8.1
Implicit type conversion (coercion)
8.2
Floating-point and integral promotion
8.3
Numeric conversions
8.4
Arithmetic conversions
8.5
Explicit type conversion (casting) and static_cast
8.6
Typedefs and type aliases
8.7
Type deduction for objects using the auto keyword
8.8
Type deduction for functions
8.9
Introduction to function overloading
8.10
Function overload differentiation
8.11
Function overload resolution and ambiguous matches
8.12
Default arguments
8.13
Function templates
8.14
Function template instantiation
8.15
Function templates with multiple template types
8.x
Chapter 8 summary and quiz
Jan 18th: Chapter 9 has been updated!

Chapter 9
Compound Types
9.1
Introduction to compound data types
Updated
9.2
Value categories (lvalues and rvalues)
Updated
9.3
Lvalue references
Updated
9.4
Lvalue references to const
Updated
9.5
Pass by lvalue reference
Updated
9.6
Introduction to pointers
Updated
9.7
Null pointers
Updated
9.8
Pointers and const
Updated
9.9
Pass by address
Updated
9.10
Pass by address (part 2)
Updated
9.11
Return by reference and return by address
Updated
9.12
Type deduction with pointers, references, and const
New
9.13
Introduction to program-defined (user-defined) types
Updated
9.14
Unscoped enumerations
Updated
9.15
Unscoped enumeration input and output
Updated
9.16
Scoped enumerations (enum classes)
Updated
9.17
Introduction to structs, members, and member selection
Updated
9.18
Struct aggregate initialization
Updated
9.19
Default member initialization
Updated
9.20
Struct passing and miscellany
Updated
9.21
Member selection with pointers and references
Updated
9.x
Chapter 9 summary and quiz
Updated
9.y
Using a language reference
Chapter 10
Arrays, Strings, Pointers, and References
10.1
Arrays (Part I)
10.2
Arrays (Part II)
10.3
Arrays and loops
10.4
Sorting an array using selection sort
10.5
Multidimensional Arrays
10.6
C-style strings
10.7
An introduction to std::string_view
10.8
Pointers and arrays
10.9
Pointer arithmetic and array indexing
10.10
C-style string symbolic constants
10.11
Dynamic memory allocation with new and delete
10.12
Dynamically allocating arrays
10.13
For-each loops
10.14
Void pointers
10.15
Pointers to pointers and dynamic multidimensional arrays
10.16
An introduction to std::array
10.17
An introduction to std::vector
10.18
Introduction to iterators
10.19
Introduction to standard library algorithms
10.x
Chapter 10 comprehensive quiz
Chapter 11
Functions
11.1
Inline functions
11.2
Function Pointers
11.3
The stack and the heap
11.4
std::vector capacity and stack behavior
11.5
Recursion
11.6
Command line arguments
11.7
Ellipsis (and why to avoid them)
11.8
Introduction to lambdas (anonymous functions)
11.9
Lambda captures
11.x
Chapter 11 comprehensive quiz

Chapter 12
Basic Object-oriented Programming
12.1
Welcome to object-oriented programming
12.2
Classes and class members
12.3
Public vs private access specifiers
12.4
Access functions and encapsulation
12.5
Constructors
12.6
Constructor member initializer lists
12.7
Non-static member initialization
12.8
Overlapping and delegating constructors
12.9
Destructors
12.10
The hidden “this” pointer
12.11
Class code and header files
12.12
Const class objects and member functions
12.13
Static member variables
12.14
Static member functions
12.15
Friend functions and classes
12.16
Anonymous objects
12.17
Nested types in classes
12.18
Timing your code
12.x
Chapter 12 comprehensive quiz
Chapter 13
Operator overloading
13.1
Introduction to operator overloading
13.2
Overloading the arithmetic operators using friend functions
13.3
Overloading operators using normal functions
13.4
Overloading the I/O operators
13.5
Overloading operators using member functions
13.6
Overloading unary operators +, -, and !
13.7
Overloading the comparison operators
13.8
Overloading the increment and decrement operators
13.9
Overloading the subscript operator
13.10
Overloading the parenthesis operator
13.11
Overloading typecasts
13.12
The copy constructor
13.13
Copy initialization
13.14
Converting constructors, explicit, and delete
13.15
Overloading the assignment operator
13.16
Shallow vs. deep copying
13.17
Overloading operators and function templates
13.x
Chapter 13 comprehensive quiz
Chapter 14
Reserved for Future Reorganization
Chapter 15
Reserved for Future Reorganization
Chapter 16
An Introduction to Object Relationships
16.1
Object relationships
16.2
Composition
16.3
Aggregation
16.4
Association
16.5
Dependencies
16.6
Container classes
16.7
std::initializer_list
16.x
Chapter 16 comprehensive quiz
Chapter 17
Inheritance
17.1
Introduction to inheritance
17.2
Basic inheritance in C++
17.3
Order of construction of derived classes
17.4
Constructors and initialization of derived classes
17.5
Inheritance and access specifiers
17.6
Adding new functionality to a derived class
17.7
Calling inherited functions and overriding behavior
17.8
Hiding inherited functionality
17.9
Multiple inheritance
17.x
Chapter 17 comprehensive quiz
Chapter 18
Virtual Functions
18.1
Pointers and references to the base class of derived objects
18.2
Virtual functions and polymorphism
18.3
The override and final specifiers, and covariant return types
18.4
Virtual destructors, virtual assignment, and overriding virtualization
18.5
Early binding and late binding
18.6
The virtual table
18.7
Pure virtual functions, abstract base classes, and interface classes
18.8
Virtual base classes
18.9
Object slicing
18.10
Dynamic casting
18.11
Printing inherited classes using operator<<
18.x
Chapter 18 comprehensive quiz
Chapter 19
Templates and Classes
19.1
Template classes
19.2
Template non-type parameters
19.3
Function template specialization
19.4
Class template specialization
19.5
Partial template specialization
19.6
Partial template specialization for pointers
19.x
Chapter 19 comprehensive quiz
Chapter 20
Exceptions
20.1
The need for exceptions
20.2
Basic exception handling
20.3
Exceptions, functions, and stack unwinding
20.4
Uncaught exceptions and catch-all handlers
20.5
Exceptions, classes, and inheritance
20.6
Rethrowing exceptions
20.7
Function try blocks
20.8
Exception dangers and downsides
20.9
Exception specifications and noexcept
20.x
Chapter 20 comprehensive quiz
Chapter M
Move Semantics and Smart Pointers
M.1
Intro to smart pointers and move semantics
M.2
R-value references
M.3
Move constructors and move assignment
M.4
std::move
M.5
std::move_if_noexcept
M.6
std::unique_ptr
M.7
std::shared_ptr
M.8
Circular dependency issues with std::shared_ptr, and std::weak_ptr
M.x
Chapter M comprehensive review
Chapter 21
The Standard Template Library
21.1
The Standard Library
21.2
STL containers overview
21.3
STL iterators overview
21.4
STL algorithms overview
Chapter 22
std::string
22.1
std::string and std::wstring
22.2
std::string construction and destruction
22.3
std::string length and capacity
22.4
std::string character access and conversion to C-style arrays
22.5
std::string assignment and swapping
22.6
std::string appending
22.7
std::string inserting
Chapter 23
Input and Output (I/O)
23.1
Input and output (I/O) streams
23.2
Input with istream
23.3
Output with ostream and ios
23.4
Stream classes for strings
23.5
Stream states and input validation
23.6
Basic file I/O
23.7
Random file I/O
Appendix A
Miscellaneous Subjects
A.1
Static and dynamic libraries
A.2
Using libraries with Visual Studio
A.3
Using libraries with Code::Blocks
Appendix B
C++ Updates
B.1
Introduction to C++11
B.2
Introduction to C++14
B.3
Introduction to C++17
B.4
Introduction to C++20
Appendix C
The End
C.1
The end?


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值