mirror of
https://github.com/changkun/modern-cpp-tutorial.git
synced 2025-12-17 12:44:40 +03:00
book: fix smart pointers (#90)
This commit is contained in:
@@ -160,8 +160,8 @@ struct B {
|
|||||||
int main() {
|
int main() {
|
||||||
auto a = std::make_shared<A>();
|
auto a = std::make_shared<A>();
|
||||||
auto b = std::make_shared<B>();
|
auto b = std::make_shared<B>();
|
||||||
a.pointer = b;
|
a->pointer = b;
|
||||||
b.pointer = a;
|
b->pointer = a;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user