Link to home
Start Free TrialLog in
Avatar of RepriseMIS
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.
Avatar of Dariusz Dziara
Dariusz Dziara
Flag of Poland image

Heve you considered usage of STL (Standard Template Library) ?
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.
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AlexFM
AlexFM

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>.