Skip to content

Commit b4f29e2

Browse files
Merge pull request #74 from splashkit/main
Fix small typo in memory deep dive
2 parents 730f67b + 1fd8028 commit b4f29e2

File tree

1 file changed

+1
-1
lines changed
  • src/content/docs/book/part-2-organised-code/6-deep-dive-memory/2a-advanced-tour

1 file changed

+1
-1
lines changed

src/content/docs/book/part-2-organised-code/6-deep-dive-memory/2a-advanced-tour/03-2-linked-add.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void add_node(linked_list<T> *list, T data)
6060
node<T> *new_node = (node<T> *) malloc(sizeof(node<T>));
6161

6262
// Placement constructor to initialise data
63-
new(new_node->data) T();
63+
new(&new_node->data) T();
6464

6565
new_node->data = data;
6666
new_node->next = nullptr;

0 commit comments

Comments
 (0)