So i have a
And i want to have direct access to My_Class object as.
My_Class * ptrMy_Class = list[id];
The list is going to have its elements be added and erased during run time.
That means the list[id] can get erased, and the ptrMy_Class has no way to check if the object still valid?
So how do i get a pointer or a reference to the object, except giving each My_Class unique ID and looping the whole list checking for matching ID.
But downfall is that each My_Class will try to access other My_Class at least once a second and list.size() is more then 1000 at any given time?