共用方式為


CRBTree::GetNextAssoc

Call this method to get the key and value of an element stored in the map and advance the position to the next element.

void GetNextAssoc(
   POSITION& pos,
   KOUTARGTYPE key,
   VOUTARGTYPE value 
) const;

Parameters

  • pos
    The position counter, returned by a previous call to methods such as CRBTree::GetHeadPosition or CRBTree::FindFirstKeyAfter.

  • key
    Template parameter specifying the type of the tree's key.

  • value
    Template parameter specifying the type of the tree's value.

Remarks

The pos position counter is updated after each call. If the retrieved element is the last in the tree, pos is set to NULL.

Requirements

Header: atlcoll.h

See Also

Concepts

CRBTree Class

CRBTree Members

CRBTree::GetPrev

CRBTree::GetNext

CRBTree::GetAt