Compartir a través de


CAtlList::GetPrev

Call this method to return the previous element from the list.

E& GetPrev(
   POSITION& pos 
) throw( );
const E& GetPrev(
   POSITION& pos 
) const throw( );

Parameters

Return Value

If the list is const, GetPrev returns a copy of an element of the list. This allows the method to be used only on the right side of an assignment statement and protects the list from modification.

If the list is not const, GetPrev returns a reference to an element of the list. This allows the method to be used on either side of an assignment statement and thus allows the list entries to be modified.

Remarks

The POSITION counter, pos, is updated to point to the previous element in the list, or NULL if there are no more elements. In debug builds, an assertion failure will occur if pos is equal to NULL.

Example

See the example for CAtlList::GetTailPosition.

Requirements

Header: atlcoll.h

See Also

Concepts

CAtlList Class

CAtlList Members

CAtlList::GetNext