Skip to content

How do I create an array in Cpp2 which is on the heap instead of the stack? #743

Answered by hsutter
jituderaps asked this question in Q&A
Discussion options

You must be logged in to vote

See #740, and this is now addressed with commit e6a1cc3 .

You can write: pi := new<std::array<int, 5>>(1, 2, 3, 4, 5);

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@JohelEGP
Comment options

Comment options

You must be logged in to vote
1 reply
@JohelEGP
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jituderaps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants