-
October 13th, 2010, 11:49 AM
#15
Re: Obtain a pointer to data inside a trend items array
i just gave that to shiw the looping logic i am going through:
pos = m_TrendItems[pen].GetTrendPoints().GetTailPosition();
if(pos)
trendpoint = m_TrendItems[pen].GetTrendPoints().GetPrev(pos);
while(pos && trendpoint.m_time < m_selection.time)
{
trendpoint = m_TrendItems[pen].GetTrendPoints().GetPrev(pos );
}
.GetTrendPoints() returns m_TrendPoints which is of type
typedef CList<CCsTrendPoint, CCsTrendPoint> CCsTrendPoints;
so technically i am working on CList m_TrendPoints;
m_TrendPoints.GetPrev(pos );
Gets the list element identified by pos, then sets pos to the POSITION value of the previous entry in the list.
now instead of getting the point, i want to get a pointer to the point something like:
trendpoint* = &m_TrendPoints.GetPrev(pos );
now, is the above code correct, will me pointer have a life as global, if so, how to make this pointer an global array, if so how to make the global array two dimensional, so that first dimension is pen and second dimension is index and value at it is the pointer
something like trendpoint[pen][i]*, how to do this?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|