Posted on 2001-07-06
Hey all, does anyone know how I can make an array in C++ where I can add and remove elements dynamically and keep it sorted at the same time? This must be able to run in a 16-bit DOS enviroment on a 486 processor. I'm using MS Visual C++ 1.52c for 16-bit apps. And before you say it, no, CArray doesn't exist here... :(
Currently I'm just defining a huge array (1500 elements) and parsing through it, moving and sorting when I need to add or removing someting. This is not very efficent and I would like a better way to do it.