I need to create an array in the heap and i use this code
Code: Select all
irr::core::array<rect<s32>> *IrrArray = new irr::core::array<rect<s32>>();
rect<s32> r= &IrrArray[0];
error C2440: 'initializing' : cannot convert from 'irr::core::array<T> *' to 'irr::core::rect<T> '
However the same thing but in the stack works fine:
Code: Select all
array<rect<s32>> IrrArray;
rect<s32> r = IrrArray[0];
Edit: well, I see it's trying to convert the array instead of the element in the array, but I don't know why