book: fix a chunk of english typos

Fixes #87
This commit is contained in:
Changkun Ou
2020-03-15 15:30:48 +01:00
parent 89060d4b96
commit a5d1563609
12 changed files with 34 additions and 32 deletions

View File

@@ -23,9 +23,10 @@ InstalledDir: /Library/Developer/CommandLineTools/usr/bin
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.
> **Note**: Deprecation is not completely unusable, it is only intended to imply that features 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
```
@@ -115,6 +116,7 @@ LDFLAGS_COMMON = -std=c++2a
all:
$(C) -c $(SOURCE_C)
$(CXX) $(SOURCE_CXX) $(OBJECTS_C) $(LDFLAGS_COMMON) -o $(TARGET)
clean:
rm -rf *.o $(TARGET)
```