1 | #include <memory> |
---|---|
2 | |
3 | struct Point { |
4 | int x, y; |
5 | }; |
6 | |
7 | int main() { |
8 | Point pt = { .x: 1, .y: 2 }; |
9 | Point points[] = {{.x: 1010,.y: 2020}, {.x: 3030,.y: 4040}, {.x: 5050,.y: 6060}}; |
10 | Point *pt_ptr = &points[1]; |
11 | Point &pt_ref = pt; |
12 | std::shared_ptr<Point> pt_sp(new Point{.x: 111,.y: 222}); |
13 | return 0; // Set a breakpoint here |
14 | } |
15 | |
16 |