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