Array resize with push?

Get help using Construct 2

Post » Thu Jul 20, 2017 4:35 pm

The documentation day that you can mimic stacks and queues lifo & fifo data structures by using a 1d array and using push and pop, but the documentation also states that array do not dynamically resize.. Does that behave differently with push vs insert?
B
54
S
29
G
2
Posts: 33
Reputation: 5,416

Post » Thu Jul 20, 2017 4:59 pm

The resize comment is only for indexing - you can not index outside of the arrays size and expect it to dynamically resize to make that index valid - it won't. The push/insert... commands do dynamically change the array size, at your command.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 47 guests