RepriseMIS
asked on
.NET "ArrayList" equivalent in unmanaged C++
Hi,
I'm trying to find out if there is a way to implement an ArrayList class in unmanaged c++ (Linux) , that has the same methods, add, insert, remove, contains, count, etc.
I've been using C# on Windows for a 3D project i am working on, but i want it to be cross-platform, and currently there are no production ready .NET engines that work with Mono and also support OpenGL. There are a few C++ engines that are cross-platform and i am contemplating re-learning C++ (havnt used it in several years since i started programming again). But i've already gotten use to the nice features of the .net framework. it would be easier if/when mono supports managed c++, but who knows when that will be ready.
Thanks in advance for any help.
PS, please provide detailed examples, as i am still re-learning C++. thanks.
I'm trying to find out if there is a way to implement an ArrayList class in unmanaged c++ (Linux) , that has the same methods, add, insert, remove, contains, count, etc.
I've been using C# on Windows for a 3D project i am working on, but i want it to be cross-platform, and currently there are no production ready .NET engines that work with Mono and also support OpenGL. There are a few C++ engines that are cross-platform and i am contemplating re-learning C++ (havnt used it in several years since i started programming again). But i've already gotten use to the nice features of the .net framework. it would be easier if/when mono supports managed c++, but who knows when that will be ready.
Thanks in advance for any help.
PS, please provide detailed examples, as i am still re-learning C++. thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can write wrapper using STL list<void*> to make emulation of ArrayList.
To emulate .NET 2.0 List<> which continues ArrayList with generics, use template class with list<T>.
To emulate .NET 2.0 List<> which continues ArrayList with generics, use template class with list<T>.
It has many container classes like map, vector, queue, ..., algoritms that operates on these containers & so called iterators that allow algoritms to access data in containers.