List of references to the objects in another list.

I'm having to rewrite or redesign due to problems I'm foreseeing in my project. However, to keep the memory usage minimal I'd like to have a list of references to objects that may be in a different list or vector.

Is it going to be as simple as:

list<Triangle> t_list;

list<Triangle &> tr_list

or would I need to make the reference list a list of pointers?
I'd go with pointers... that way you can point them to existing objects or allocate them dynamically. Also a pointer can be void whereas a reference cannot.
Topic archived. No new replies allowed.