# 2.2、语句
语句主要分为一般语句、条件语句、循环语句、跳跃语句和异常处理语句。
**一般语句**:空语句(null statement)、表达式语句(expression statement)、组合语句(compound statement,block)。
> The simplest statement is the empty statement, also known as a **null statement**.
> A **compound statement**, usually referred to as a block, is a sequence of statements and declarations surrounded by a pair of curly braces.
**条件语句**:`if`,`switch`。[Reference: runoob-C++条件语句](https://www.runoob.com/cplusplus/cpp-decision.html)
**循环语句**:`while`、`for`、`do while`。[Reference: runoob-C++循环语句](https://www.runoob.com/cplusplus/cpp-loops.html)
**跳跃语句**:`break`、`continue`、`goto`。
> A **break** statement terminates the nearest enclosing while, do while, for, or switch statement.
> A **continue** statement terminates the current iteration of the nearest enclosing loop and immediately begins the next iteration. A continue can appear only inside a for, while, or do while loop, including inside statements or blocks nested inside such loops.
> A **goto** statement provides an unconditional jump from the goto to a another statement in the same function.
**异常处理语句**:`try catch`、`throw`。[Reference: runoob-C++异常处理语句](https://www.runoob.com/cplusplus/cpp-exceptions-handling.html)
- 目录
- 基础知识
- 1、变量和基础类型
- 1.1、内置类型
- 1.2、变量
- 1.3、复合类型
- 1.4、类型修饰符
- 1.5、类型处理
- 1.6、自定义结构
- 1.7、数组
- 2、表达式和语句
- 2.1、运算符
- 2.2、语句
- 3、函数
- 1、语法相关
- 2、资源管理
- 3、面向对象
- 4、模板与泛型编程
- Problem01:判断类中是否包含函数
- Problem02:解析函数的参数类型
- 5、系统库
- Problem01:多线程维护最大值
- Problem02:介绍一下strcpy、strncpy、memcpy、memmove
- Problem03:介绍一下网络编程
- Problem04:select、poll、epoll的区别
- 未整理
- Problem11:实现在main函数前、后执行的函数
- Problem12:可变参函数的实现
- Problem13:全局变量初始化顺序问题
- Problem14:介绍一下隐式转换
- Problem07:实现一个不能被拷贝的类
- Problem08:实现一个只能通过动态、静态分配的类
- 开源项目
- redis
- 第一部分 数据结构与对象
- redis 底层数据结构
- redis 对象
- taskflow
- 数据结构
- Executor
