Udostępnij za pośrednictwem


CAtlList::GetTail

Call this method to return the element at the tail of the list.

E& GetTail( ) throw( ); 
const E& GetTail( ) const throw( );

Return Value

Returns a reference to, or a copy of, the element at the tail of the list.

Remarks

If the list is const, GetTail returns a copy of the element at the head 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, GetTail returns a reference to the element at the head 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.

In debug builds, an assertion failure will occur if the tail of the list points to NULL.

Example

See the example for CAtlList::AddTail.

Requirements

Header: atlcoll.h

See Also

Reference

CAtlList Class

CAtlList::GetTailPosition

CAtlList::GetHead

Other Resources

CAtlList Members