Message 1 of 7
AcArray
Not applicable
01-16-2002
12:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I hope I don't sound ignorant, but is it safe to store a pointer to an
element in an AcArray? I mean, let's say I have this:
extern MyObject *m_pObj;
extern AcArray > arr;
...
MyObject obj;
int pos = arr.append(obj);
m_pObj = &(arr[pos]); // Is this okay??
...
This is what I'm trying to do: I want to associate an array with a list
box - I could store the *index* of the desired object in the list box, but I
would like to refer to the object from inside the list box class itself (and
therefore will not have access to the array). The array is a data member of
the dialog class . Am I just asking for trouble?
element in an AcArray? I mean, let's say I have this:
extern MyObject *m_pObj;
extern AcArray
...
MyObject obj;
int pos = arr.append(obj);
m_pObj = &(arr[pos]); // Is this okay??
...
This is what I'm trying to do: I want to associate an array with a list
box - I could store the *index* of the desired object in the list box, but I
would like to refer to the object from inside the list box class itself (and
therefore will not have access to the array). The array is a data member of
the dialog class . Am I just asking for trouble?