How do I create an array in Cpp2 which is on the heap instead of the stack? #743
-
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
This happens to work (https://cpp2.godbolt.org/z/8ehdn71W5):
Because #628 (comment) and #628 (comment) aren't implemented yet. |
Beta Was this translation helpful? Give feedback.
-
This works, somewhat it terminates on out of bounds access too. But idk how to initialise the elements |
Beta Was this translation helpful? Give feedback.
-
See #740, and this is now addressed with commit e6a1cc3 . You can write: |
Beta Was this translation helpful? Give feedback.
See #740, and this is now addressed with commit e6a1cc3 .
You can write:
pi := new<std::array<int, 5>>(1, 2, 3, 4, 5);