array.erase() doesn't work
array.erase() doesn't work
I have a bunch of objects that uses array and when I try to erase them, they don't get removed from the array. I changed those objects to std::vector and it worked the way it was supposed to.
Re: array.erase() doesn't work
Sorry, that's not enough information for me to help you. Irrlicht's array works different than std::vector sometimes. But I can't guess what is different in this specific case without any example where I can see what you actually do. I often use erase myself and so does Irrlicht, so it's not like it never works.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: array.erase() doesn't work
I tried to create a small example but it is working in the small example. Its strange. In my current project, I changed the array to a std::vector and it fixed the issue but it may be something I am just doing wrong with array. My current project is already several files and probably over 20,000 lines of code so it probably wouldn't be helpful as an example.
If I figure out what I am doing wrong I will post an update.
If I figure out what I am doing wrong I will post an update.