VecReverse

Table of Contents

VecReverse

Description

Reverse contents of this vector.

Parameters

NameDirectionDescription
vin,outVector to be reversed.

Success

v

Failure

Does not return on failure

Usage example (Cross-references)

    /// FAILURE : NULL
    ///
    #define StrReverse(str) VecReverse((str))
    
    #ifdef __cplusplus
    // Test VecReverse function
    bool test_vec_reverse(void) {
    printf("Testing VecReverse\n");
    
    // Create a vector of integers
    
    // Reverse the vector
    VecReverse(&vec);
    
    // Check that the elements are reversed
    
    // Reverse again to get back to the original order
    VecReverse(&vec);
    
    // Check that the elements are back in the original order
    
    // Reverse the vector
    VecReverse(&vec);
    
    // Check that the elements are reversed

Share :