How do I init an irrlicht Arrray?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
pippy3
Posts: 155
Joined: Tue Dec 15, 2009 7:32 am

How do I init an irrlicht Arrray?

Post 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?
Bate
Posts: 364
Joined: Sun Nov 01, 2009 11:39 pm
Location: Germany

Post 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
Never take advice from someone who likes to give advice, so take my advice and don't take it.
pippy3
Posts: 155
Joined: Tue Dec 15, 2009 7:32 am

Post 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.
Bear_130278
Posts: 237
Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation

Post by Bear_130278 »

Array is dynamic....
Do you like VODKA???
Image
Image
Anthony
Posts: 121
Joined: Sun Jan 09, 2011 12:03 pm

Post by Anthony »

signature: Bear_130278 wrote:Do you like VODKA???
Vodka makes any array dynamic
No :shock: I am no noob, just checking if your not one too :roll:

Thanks to Niko and all others that made Irrlicht possible.
Post Reply