diff --git a/book/en-us/00-preface.md b/book/en-us/00-preface.md index 75dfc360..33de3bfa 100644 --- a/book/en-us/00-preface.md +++ b/book/en-us/00-preface.md @@ -10,12 +10,41 @@ order: 0 ## Introduction +C++ user group is a fairly large. From the advent of C++98 to the official finalization of C++11, it has accumulated over a decade. C++14/17 is an important complement and optimization for C++11, and C++20 brings this language to the door of modernization. The extended features of all these new standards are given to the C++ language. Infused with new vitality. +C++ programmers, who are still using traditional C++** (this book refers to C++98 and its previous C++ standards as traditional C++), may even amzed by the fact that they are not using the same language while reading C++11/14/17/20 code. + +**Modern C++** (this book refers to C++11/14/17/20) introduces a lot of features into traditional C++, which makes the whole C++ become language that modernized. Modern C++ not only enhances the usability of the C++ language itself, but the modification of the `auto` keyword semantics gives us more confidence in manipulating extremely complex template types. At the same time, a lot of enhancements have been made to the language runtime. The emergence of Lambda expressions has made C++ have the "closure" feature of "anonymous functions", which is almost in modern programming languages ​​(such as Python/Swift/.. It has become commonplace, and the emergence of rvalue references has solved the problem of temporary object efficiency that C++ has long been criticized. + +C++17 is the direction that has been promoted by the C++ community in the past three years. It also points out an important development direction of modern C++** programming. Although it does not appear as much as C++11, it contains a large number of small and beautiful languages ​​and features (such as structured binding), and the appearance of these features once again corrects our programming paradigm in C++. + +Modern C++ also adds a lot of tools and methods to its own standard library, such as `std::thread` at the level of the language itself, which supports concurrent programming and no longer depends on the underlying system on different platforms. The API implements cross-platform support at the language level; `std::regex` provides full regular expression support and more. C++98 has been proven to be a very successful "paradigm", and the emergence of modern C++ further promotes this paradigm, making C++ a better language for system programming and library development. Concepts provide verification on the compile-time of template parameters, further enhancing the usability of the language. + +In conclusion, as an advocate and practitioner of C++, we always maintain an open mind to accept new things, and we can promote the development of C++ faster, making this old and novel language more vibrant. + ## Targets +- This book assumes that readers are already familiar with traditional C++ (i.e. C++98 or earlier), at least they do not have any difficulty in reading traditional C++ code. In other words, those who have long experience in traditional C++ and people who desire to quickly understand the features of modern C++ in a short period of time are well suited to read the book; + +- This book introduces to a certain extent of the dark magic of modern C++. However, these magics are very limited, they are not suitable for readers who want to learn advanced C++. The purpose of this book is offering a quick start for modern C++. Of course, advanced readers can also use this book to review and examine themselves on modern C++. + ## Purpose +The book claims "On the Fly". Its intent is to provide a comprehensive introduction to the relevant features regarding modern C++ (before 2020s). +Readers can choose interesting content according to the following table of content to learn and quickly familiarize the new features you would like to learn. +Readers should aware that all of these features are not required. It should be leart when you really need it. + +At the same time, instead of grammar-only, the book introduces the historical background as simple as possible of its technical requirements, which provides great help in understanding why these features comes out. + +In addition, The author would like to encourage that readers should be able to use modern C++ directly in their new projects and migrate their old projects to modern C++ gradually after read the book. + ## Code +Each chapter of this book has a lot of code. If you encounter problems when writing your own code with the introductory features of the book, you might as well read the source code attached to the book. You can find the book [here](../../code). All the code organized by chapter, the folder name is the chapter number. + +## Exercises + +There are few exercises At the end of each chapter of the book. It is for testing whether you can use the knowledge points in the current chapter. You can find the possible answer to the problem from [here](../../exercise). The folder name is the chapter number. + [Table of Content](./toc.md) | [Next Chapter: Towards Modern C++](./01-intro.md) ## Licenses diff --git a/book/en-us/01-intro.md b/book/en-us/01-intro.md index 824cef54..826fde4e 100644 --- a/book/en-us/01-intro.md +++ b/book/en-us/01-intro.md @@ -1,15 +1,147 @@ --- title: Chapter 01:Towards Modern C++ -type: book-zh-cn +type: book-en-us order: 1 --- # Chapter 01: Towards Modern C++ +[TOC] + +**Compilation Environment**: This book will use `clang++` as the only compiler used, +and always use the `-std=c++2a` compilation flag in your code. + +```bash +$ clang++ -v +Apple LLVM version 10.0.1 (clang-1001.0.46.4) +Target: x86_64-apple-darwin18.6.0 +Thread model: posix +InstalledDir: /Library/Developer/CommandLineTools/usr/bin +``` + +## 1.1 Deprecated Features + +Before learning modern C++, let's take a look at the main features that have been deprecated since C++11: + +> **Note**: Deprecation is not completely unusable, it is only intended to imply that programmers will disappear from future standards and should be avoided. However, the deprecated features are still part of the standard library, and most of the features are actually "permanently" reserved for compatibility reasons. + +- **The string literal constant is no longer allowed to be assigned to a `char *`. If you need to assign and initialize a `char *` with a string literal constant, you should use `const char *` or `auto`.** + ```cpp + char *str = "hello world!"; // A deprecation warning will appear + ``` + +- **C++98 exception description, `unexpected_handler`, `set_unexpected()` and other related features are deprecated and should use `noexcept`.** + +- **`auto_ptr` is deprecated and `unique_ptr` should be used.** + +- **`register` keyword is deprecated and can be used but no longer has any practical meaning.** + +- The `++` operation of the **`bool` type is deprecated.** + +- ** If a class has a destructor, the properties for which it generates copy constructors and copy assignment operators are deprecated.** + +- **C language style type conversion is deprecated (ie using `(convert_type)`) before variables, and `static_cast`, `reinterpret_cast`, `const_cast` should be used for type conversion.** + +- **In particular, some of the C standard libraries that can be used are deprecated in the latest C++17 standard, such as ``, ``, `` and `` Wait** + +- ... and many more + +There are also other features such as parameter binding (C++11 provides `std::bind` and `std::function`), `export`, and etc. are also deprecated. These features mentioned above **If you have never used or heard of it, please don't try to understand them. You should move closer to the new standard and learn new features directly**. After all, technology is moving forward. + +## 1.2 Compatibilities with C + +For some force majeure and historical reasons, we had to use some C code (even old C code) in C++, for example, Linux system calls. Before the advent of modern C++, most people talked about "what is the difference between C and C++". Generally speaking, in addition to answering the object-oriented class features and the template features of generic programming, there is no other opinion, or even a direct answer. "Almost" is also a lot of people. The Wayne diagram in Figure 1.2 roughly answers the C and C++ related compatibility. + +![Figure 1.2: Compatabilities between ISO C and ISO C++](../../assets/figures/comparison.png) + +From now on, you should have the idea that "C++ is **not** a superset of C" in your mind (and not from the beginning, later [References for further reading] (# further reading references) The difference between C++98 and C99 is given). When writing C++, you should also avoid using program styles such as `void*` whenever possible. When you have to use C, you should pay attention to the use of `extern "C"`, separate the C language code from the C++ code, and then unify the link, for instance: + +```cpp +// foo.h +#ifdef __cplusplus +extern "C" { +#endif + +int add(int x, int y); + +#ifdef __cplusplus +} +#endif + +// foo.c +int add(int x, int y) { + return x+y; +} + +// 1.1.cpp +#include "foo.h" +#include +#include + +int main() { + [out = std::ref(std::cout << "Result from C code: " << add(1, 2))](){ + out.get() << ".\n"; + }(); + return 0; +} +``` + +You should first compile the C code with `gcc`: + +```bash +gcc -c foo.c +``` + +Comple and output the `foo.o` file, and link the C++ code to the `.o` file using `clang++` (or both compile to `.o` and then unlink them together): + +```bash +clang++ 1.1.cpp foo.o -std=c++2a -o 1.1 +``` + +Of course, you can use `Makefile` to compile the above code: + +```makefile +C = gcc +CXX = clang++ + +SOURCE_C = foo.c +OBJECTS_C = foo.o + +SOURCE_CXX = 1.1.cpp + +TARGET = 1.1 +LDFLAGS_COMMON = -std=c++2a + +all: + $(C) -c $(SOURCE_C) + $(CXX) $(SOURCE_CXX) $(OBJECTS_C) $(LDFLAGS_COMMON) -o $(TARGET) +clean: + rm -rf *.o $(TARGET) +``` + +> Note: Indentation in `Makefile` is a tab instead of a space character. If you copy this code directly into your editor, the tab may be automatically replaced. Please ensure the indentation in the `Makefile`. It is done by tabs. +> +> If you don't know the use of `Makefile`, it doesn't matter. In this tutorial, you won't build code that is written too complicated. You can also read this book by simply using `clang++ -std=c++2a` on the command line. + +If you are new to modern C++, you probably still don't understand the following small piece of code above, namely: + +```cpp +[out = std::ref(std::cout << "Result from C code: " << add(1, 2))](){ + out.get() << ".\n"; +}(); +``` + +Don't worry at the moment, we will come to meet them in our later chapters. + [Table of Content](./toc.md) | [Previous Chapter](./00-preface.md) | [Next Chapter: Language Usability Enhancements](./02-usability.md) ## Further Readings +- [A Tour of C++ (2nd Edition) Bjarne Stroustrup](https://www.amazon.com/dp/0134997832/ref=cm_sw_em_r_mt_dp_U_GogjDbHE2H53B) +- [C++ History](http://en.cppreference.com/w/cpp/language/history) +- [C++ compiler support](https://en.cppreference.com/w/cpp/compiler_support) +- [Incompatibilities Between ISO C and ISO C++](http://david.tribble.com/text/cdiffs.htm#C99-vs-CPP98) + ## Licenses Creative Commons License
This work was written by [Ou Changkun](https://changkun.de) and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. The code of this repository is open sourced under the [MIT license](../../LICENSE). \ No newline at end of file diff --git a/book/zh-cn/00-preface.md b/book/zh-cn/00-preface.md index b8196e68..992fdb3d 100644 --- a/book/zh-cn/00-preface.md +++ b/book/zh-cn/00-preface.md @@ -10,14 +10,14 @@ order: 0 ## 引言 -C++ 是一个用户群体相当大的语言。从 C++98 的出现到 C++11 的正式定稿经历了长达十年多之久的积累。C++14/17 则是作为对 C++11 的重要补充和优化,所有这些新标准中扩充的特性,给 C++ 这门语言注入了新的活力。 +C++ 是一个用户群体相当大的语言。从 C++98 的出现到 C++11 的正式定稿经历了长达十年多之久的积累。C++14/17 则是作为对 C++11 的重要补充和优化,C++20 则将这门语言领进了现代化的大门,所有这些新标准中扩充的特性,给 C++ 这门语言注入了新的活力。 那些还在坚持使用**传统 C++**(本书把 C++98 及其之前的 C++ 特性均称之为传统 C++)而未接触过 C++11/14/17/20 的 C++ 程序员在见到诸如 Lambda 表达式这类全新特性时,甚至会流露出『学的不是同一门语言』的惊叹之情。 -**C++1x** (或**现代 C++**,本书中均指 C++11/14/17/20) 为传统 C++ 注入的大量特性使得整个 C++ 变得更加像一门现代化的语言。C++1x 不仅仅增强了 C++ 语言自身的可用性,`auto` 关键字语义的修改使得我们更加有信心来操控极度复杂的模板类型。同时还对语言运行期进行了大量的强化,Lambda 表达式的出现让 C++ 具有了『匿名函数』的『闭包』特性,而这一特性几乎在现代的编程语言(诸如 Python/Swift/... )中已经司空见惯,右值引用的出现解决了 C++ 长期以来被人诟病的临时对象效率问题等等。 +**现代 C++** (本书中均指 C++11/14/17/20) 为传统 C++ 注入的大量特性使得整个 C++ 变得更加像一门现代化的语言。现代 C++ 不仅仅增强了 C++ 语言自身的可用性,`auto` 关键字语义的修改使得我们更加有信心来操控极度复杂的模板类型。同时还对语言运行期进行了大量的强化,Lambda 表达式的出现让 C++ 具有了『匿名函数』的『闭包』特性,而这一特性几乎在现代的编程语言(诸如 Python/Swift/... )中已经司空见惯,右值引用的出现解决了 C++ 长期以来被人诟病的临时对象效率问题等等。 C++17 则是近三年依赖 C++ 社区一致推进的方向,也指出了**现代C++**编程的一个重要发展方向。尽管它的出现并不如 C++11 的分量之重,但它包含了大量小而美的语言与特性(例如结构化绑定),这些特性的出现再一次修正了我们在 C++ 中的编程范式。 -现代 C++ 还为自身的标准库增加了非常多的工具和方法,诸如在语言自身标准的层面上制定了 `std::thread`,从而支持了并发编程,在不同平台上不再依赖于系统底层的 API,实现了语言层面的跨平台支持;`std::regex` 提供了完整的正则表达式支持等等。C++98 已经被实践证明了是一种非常成功的『范型』,而 C++1x 的出现,则进一步推动这种范型,让 C++ 成为系统程序设计和库开发更好的语言。 +现代 C++ 还为自身的标准库增加了非常多的工具和方法,诸如在语言自身标准的层面上制定了 `std::thread`,从而支持了并发编程,在不同平台上不再依赖于系统底层的 API,实现了语言层面的跨平台支持;`std::regex` 提供了完整的正则表达式支持等等。C++98 已经被实践证明了是一种非常成功的『范型』,而现代 C++ 的出现,则进一步推动这种范型,让 C++ 成为系统程序设计和库开发更好的语言。Concept 提供了对模板参数编译期的检查,进一步增强了语言整体的可用性。 总而言之,我们作为 C++ 的拥护与实践者,始终保持接纳新事物的开放心态,才能更快的推进 C++ 的发展,使得这门古老而又新颖的语言更加充满活力。 @@ -36,7 +36,11 @@ C++17 则是近三年依赖 C++ 社区一致推进的方向,也指出了**现 ## 相关代码 -本书每章中都出现了大量的代码,如果你在跟随本书介绍特性的思路编写自己的代码遇到问题时,不妨读一读随书附上的源码,你可以在[这里](../code)中找到书中介绍过的全部的源码,所有代码按章节组织,文件夹名称为章节序号。 +本书每章中都出现了大量的代码,如果你在跟随本书介绍特性的思路编写自己的代码遇到问题时,不妨读一读随书附上的源码,你可以在[这里](../../code)中找到书中介绍过的全部的源码,所有代码按章节组织,文件夹名称为章节序号。 + +## 随书习题 + +本书每章最后还加入了少量难度极小的习题,仅用于检验你是否能混合运用当前章节中的知识点。你可以在[这里](../../exercises)找到习题的答案,文件夹名称为章节序号。 [返回目录](./toc.md) | [下一章 迈向现代 C++](./01-intro.md) diff --git a/book/zh-cn/01-intro.md b/book/zh-cn/01-intro.md index 31c8234f..a99403da 100644 --- a/book/zh-cn/01-intro.md +++ b/book/zh-cn/01-intro.md @@ -8,19 +8,19 @@ order: 1 [TOC] -**编译环境**:本书将使用 `clang++` 作为唯一使用的编译器,同时总是在代码中使用 `-std=c++17` 编译标志。 +**编译环境**:本书将使用 `clang++` 作为唯一使用的编译器,同时总是在代码中使用 `-std=c++2a` 编译标志。 ```bash -→ clang++ -v -Apple LLVM version 9.1.0 (clang-902.0.39.1) -Target: x86_64-apple-darwin17.5.0 +$ clang++ -v +Apple LLVM version 10.0.1 (clang-1001.0.46.4) +Target: x86_64-apple-darwin18.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin ``` ## 1.1 被弃用的特性 -在学习 C++1x 之前,我们先了解一下从 C++11 开始,被弃用的主要特性: +在学习现代 C++ 之前,我们先了解一下从 C++11 开始,被弃用的主要特性: > **注意**:弃用并非彻底不能用,只是用于暗示程序员这些特性将从未来的标准中消失,应该尽量避免使用。但是,已弃用的特性依然是标准库的一部分,并且出于兼容性的考虑,大部分特性其实会『永久』保留。 @@ -49,7 +49,7 @@ InstalledDir: /Library/Developer/CommandLineTools/usr/bin ## 1.2 与 C 的兼容性 -出于一些不可抗力、历史原因,我们不得不在 C++ 中使用一些 C 语言代码(甚至古老的 C 语言代码),例如 Linux 系统调用。在 C++1x 出现之前,大部分人当谈及『C 与 C++ 的区别是什么』时,普遍除了回答面向对象的类特性、泛型编程的模板特性外,就没有其他的看法了,甚至直接回答『差不多』,也是大有人在。图 1.2 中的韦恩图大致上回答了 C 和 C++ 相关的兼容情况。 +出于一些不可抗力、历史原因,我们不得不在 C++ 中使用一些 C 语言代码(甚至古老的 C 语言代码),例如 Linux 系统调用。在现代 C++ 出现之前,大部分人当谈及『C 与 C++ 的区别是什么』时,普遍除了回答面向对象的类特性、泛型编程的模板特性外,就没有其他的看法了,甚至直接回答『差不多』,也是大有人在。图 1.2 中的韦恩图大致上回答了 C 和 C++ 相关的兼容情况。 ![图 1.2: C 和 C++ 互相兼容情况](../../assets/figures/comparison.png) @@ -91,10 +91,10 @@ int main() { gcc -c foo.c ``` -编译出 foo.o 文件,再使用 `clang++` 将 C++代码和 `.o` 文件链接起来(或者都编译为 `.o` 再统一链接): +编译出 `foo.o` 文件,再使用 `clang++` 将 C++代码和 `.o` 文件链接起来(或者都编译为 `.o` 再统一链接): ```bash -clang++ 1.1.cpp foo.o -std=c++17 -o 1.1 +clang++ 1.1.cpp foo.o -std=c++2a -o 1.1 ``` 当然,你可以使用 `Makefile` 来编译上面的代码: @@ -109,7 +109,7 @@ OBJECTS_C = foo.o SOURCE_CXX = 1.1.cpp TARGET = 1.1 -LDFLAGS_COMMON = -std=c++17 +LDFLAGS_COMMON = -std=c++2a all: $(C) -c $(SOURCE_C) @@ -118,9 +118,9 @@ clean: rm -rf *.o $(TARGET) ``` -> 注意:Makefile 中的缩进是制表符而不是空格符,如果你直接复制这段代码到你的编辑器中,制表符可能会被自动替换掉,请自行确保在 Makefile 中的缩进是由制表符完成的。 +> 注意:`Makefile` 中的缩进是制表符而不是空格符,如果你直接复制这段代码到你的编辑器中,制表符可能会被自动替换掉,请自行确保在 `Makefile` 中的缩进是由制表符完成的。 > -> 如果你还不知道 Makefile 的使用也没有关系,本教程中不会构建过于复杂的代码,简单的在命令行中使用 `clang++ -std=c++17` 也可以阅读本书。 +> 如果你还不知道 Makefile 的使用也没有关系,本教程中不会构建过于复杂的代码,简单的在命令行中使用 `clang++ -std=c++2a` 也可以阅读本书。 如果你是首次接触现代 C++,那么你很可能还看不懂上面的那一小段代码,即: @@ -136,10 +136,10 @@ clean: ## 进一步阅读的参考文献 -1. [C++ 语言导学. Bjarne Stroustrup](https://www.amazon.cn/dp/B00WUBYBYS/ref=sr_1_1?ie=UTF8&qid=1522400738&sr=8-1&keywords=C%2B%2B+%E8%AF%AD%E8%A8%80%E5%AF%BC%E5%AD%A6) -2. [C++ 历史](http://en.cppreference.com/w/cpp/language/history) -3. [C++ 1x 特性在 GCC/Clang 等编译器中的支持情况](http://en.cppreference.com/w/cpp/compiler_support) -4. [C++98 与 C99 之间的区别](http://david.tribble.com/text/cdiffs.htm#C99-vs-CPP98) +- [C++ 语言导学. Bjarne Stroustrup](https://www.amazon.cn/dp/B00WUBYBYS/ref=sr_1_1?ie=UTF8&qid=1522400738&sr=8-1&keywords=C%2B%2B+%E8%AF%AD%E8%A8%80%E5%AF%BC%E5%AD%A6) +- [C++ 历史](http://en.cppreference.com/w/cpp/language/history) +- [C++ 特性在 GCC/Clang 等编译器中的支持情况](http://en.cppreference.com/w/cpp/compiler_support) +- [C++98 与 C99 之间的区别](http://david.tribble.com/text/cdiffs.htm#C99-vs-CPP98) ## 许可 diff --git a/book/zh-cn/05-pointers.md b/book/zh-cn/05-pointers.md index 3c583d53..382e2efe 100644 --- a/book/zh-cn/05-pointers.md +++ b/book/zh-cn/05-pointers.md @@ -171,7 +171,7 @@ int main() { ## 总结 -智能指针这种技术并不新奇,在很多语言中都是一种常见的技术,C++1x 将这项技术引进,在一定程度上消除了 `new`/`delete` 的滥用,是一种更加成熟的编程范式。 +智能指针这种技术并不新奇,在很多语言中都是一种常见的技术,现代 C++ 将这项技术引进,在一定程度上消除了 `new`/`delete` 的滥用,是一种更加成熟的编程范式。 [返回目录](./toc.md) | [上一章](./04-containers.md) | [下一章 标准库:正则表达式](./06-regex.md) diff --git a/book/zh-cn/09-others.md b/book/zh-cn/09-others.md index da6ccf5d..fd07b775 100644 --- a/book/zh-cn/09-others.md +++ b/book/zh-cn/09-others.md @@ -141,7 +141,7 @@ return 0; ## 总结 -本节介绍的几个特性是从仍未介绍的 C++1x 新特性里使用频次较靠前的特性了,`noexcept` 是最为重要的特性,它的一个功能在于能够阻止异常的扩散传播,有效的让编译器最大限度的优化我们的代码。 +本节介绍的几个特性是从仍未介绍的现代 C++ 新特性里使用频次较靠前的特性了,`noexcept` 是最为重要的特性,它的一个功能在于能够阻止异常的扩散传播,有效的让编译器最大限度的优化我们的代码。 [返回目录](./toc.md) | [上一章](./08-filesystem.md) | [下一章 展望:C++20 简介](./10-cpp20.md) diff --git a/code/1/Makefile b/code/1/Makefile index e0d5b00f..ed50295d 100644 --- a/code/1/Makefile +++ b/code/1/Makefile @@ -16,7 +16,7 @@ OBJECTS_C = foo.o SOURCE_CXX = 1.1.c.and.cpp TARGET = 1.1.out -LDFLAGS_COMMON = -std=c++17 +LDFLAGS_COMMON = -std=c++2a all: $(C) -c $(SOURCE_C) diff --git a/code/2/Makefile b/code/2/Makefile index d7f251cc..fe333edc 100644 --- a/code/2/Makefile +++ b/code/2/Makefile @@ -1,7 +1,7 @@ all: $(patsubst %.cpp, %.out, $(wildcard *.cpp)) %.out: %.cpp Makefile - clang++ $< -o $@ -std=c++17 -pedantic + clang++ $< -o $@ -std=c++2a -pedantic clean: rm *.out \ No newline at end of file diff --git a/code/2/todo/2.6.cpp b/code/2/todo/2.6.cpp index 91895d6d..8f3c159f 100644 --- a/code/2/todo/2.6.cpp +++ b/code/2/todo/2.6.cpp @@ -1,6 +1,6 @@ // // 2.6.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/2/todo/2.7.cpp b/code/2/todo/2.7.cpp index da4f9c28..1d011667 100644 --- a/code/2/todo/2.7.cpp +++ b/code/2/todo/2.7.cpp @@ -1,6 +1,6 @@ // // 2.7.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/2/todo/2.8.cpp b/code/2/todo/2.8.cpp index ed72c6cc..fe9b736f 100644 --- a/code/2/todo/2.8.cpp +++ b/code/2/todo/2.8.cpp @@ -1,6 +1,6 @@ // // 2.8.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/3/3.1.cpp b/code/3/3.1.cpp index 954a8ae3..4110ee1d 100644 --- a/code/3/3.1.cpp +++ b/code/3/3.1.cpp @@ -1,6 +1,6 @@ // // 3.1.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/3/3.2.cpp b/code/3/3.2.cpp index e8ac6b8c..d213bd41 100644 --- a/code/3/3.2.cpp +++ b/code/3/3.2.cpp @@ -1,6 +1,6 @@ // // 3.2.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/3/3.3.cpp b/code/3/3.3.cpp index d88ca7dc..f34a30a1 100644 --- a/code/3/3.3.cpp +++ b/code/3/3.3.cpp @@ -1,6 +1,6 @@ // // 3.3.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/3/3.4.cpp b/code/3/3.4.cpp index 22ed7406..ca0e97a3 100644 --- a/code/3/3.4.cpp +++ b/code/3/3.4.cpp @@ -1,6 +1,6 @@ // // 3.4.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/3/3.5.cpp b/code/3/3.5.cpp index ce22c9ec..2e38e23f 100644 --- a/code/3/3.5.cpp +++ b/code/3/3.5.cpp @@ -1,6 +1,6 @@ // // 3.5.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/3/3.6.cpp b/code/3/3.6.cpp index 5021e9e6..3249e17c 100644 --- a/code/3/3.6.cpp +++ b/code/3/3.6.cpp @@ -1,6 +1,6 @@ // // 3.6.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/4/4.1.cpp b/code/4/4.1.cpp index 21932a42..f8796395 100644 --- a/code/4/4.1.cpp +++ b/code/4/4.1.cpp @@ -1,6 +1,6 @@ // // 4.1.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/4/4.2.cpp b/code/4/4.2.cpp index 6444eec3..bfed726c 100644 --- a/code/4/4.2.cpp +++ b/code/4/4.2.cpp @@ -1,6 +1,6 @@ // // 4.2.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/4/4.3.cpp b/code/4/4.3.cpp index c635230d..93e70fab 100644 --- a/code/4/4.3.cpp +++ b/code/4/4.3.cpp @@ -1,6 +1,6 @@ // // 4.3.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/6/6.1.cpp b/code/6/6.1.cpp index bd74b848..3563e99e 100644 --- a/code/6/6.1.cpp +++ b/code/6/6.1.cpp @@ -1,6 +1,6 @@ // // 6.1.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/7/7.1.cpp b/code/7/7.1.cpp index 6ee7e8b7..b673d8c3 100644 --- a/code/7/7.1.cpp +++ b/code/7/7.1.cpp @@ -1,6 +1,6 @@ // // 7.1.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/7/7.2.cpp b/code/7/7.2.cpp index 6f6e5a90..99b6cdb5 100644 --- a/code/7/7.2.cpp +++ b/code/7/7.2.cpp @@ -1,6 +1,6 @@ // // 7.2.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/8/8.1.cpp b/code/8/8.1.cpp index 3875ebab..1a07b216 100644 --- a/code/8/8.1.cpp +++ b/code/8/8.1.cpp @@ -1,6 +1,6 @@ // // 8.1.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de // diff --git a/code/8/8.2.cpp b/code/8/8.2.cpp index 34526df8..294e0241 100644 --- a/code/8/8.2.cpp +++ b/code/8/8.2.cpp @@ -1,6 +1,6 @@ // // 8.2.cpp -// c++1x tutorial +// modern c++ tutorial // // created by changkun at changkun.de //