Page 1 of 1
How do I init an irrlicht Arrray?
Posted: Tue Feb 08, 2011 6:32 am
by pippy3
I have a list of things I want to initialize.
core::array<s32> filter[] = {10,-29}
This compiles, but it's incorrect and crashes. Can I allocate an irrlicht array in short notation?
Posted: Tue Feb 08, 2011 6:49 am
by Bate
Code: Select all
core::array<s32> filter;
// if you know the start count, you can pass it to the constructor like this:
// core::array<s32> filter(2);
filter.push_back(10);
filter.push_back(-29);
Irrlicht API - Template Array
Posted: Tue Feb 08, 2011 6:52 am
by pippy3
Bate wrote:Code: Select all
core::array<s32> filter;
// if you know the start count, you can pass it to the constructor like this:
// core::array<s32> filter(2);
filter.push_back(10);
filter.push_back(-29);
Irrlicht API - Template Array
I had a feeling there was only the long way.
Posted: Tue Feb 08, 2011 7:07 am
by Bear_130278
Array is dynamic....
Posted: Tue Feb 08, 2011 10:39 am
by Anthony
signature: Bear_130278 wrote:Do you like VODKA???
Vodka makes any array dynamic