VecEnd

Table of Contents

VecEnd

Description

Pointer at the end (after last element) of vector

Parameters

NameDirectionDescription
vinVector to get end of.

Usage example (Cross-references)

    /// Get pointer to one past the last character in string
    ///
    #define StrEnd(str) VecEnd(str)
    
    ///
    // Test VecBegin and VecEnd functions
    bool test_vec_begin_end(void) {
    printf("Testing VecBegin and VecEnd\n");
    
    // Create a vector of integers
    // Get begin and end pointers
    int*  begin = VecBegin(&vec);
    char* end   = (char*)VecEnd(&vec);
    
    // Check that begin points to the first element

Share :