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?
How do I init an irrlicht Arrray?
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);
Never take advice from someone who likes to give advice, so take my advice and don't take it.
I had a feeling there was only the long way.Bate wrote:Irrlicht API - Template ArrayCode: 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);
-
- Posts: 237
- Joined: Mon Jan 16, 2006 1:18 pm
- Location: Odessa,Russian Federation