Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Latest commit

 

History

History
16 lines (12 loc) · 360 Bytes

swap.md

File metadata and controls

16 lines (12 loc) · 360 Bytes

swap

Description : Swaps the contents of two vectors

Example:

    //Intializing the vectors  
    std::vector<int> vector1 = {1,2,3};
    std::vector<int> vector2 = {4,5,6,6};

    //Function to swap the vectors
    vector1.swap(vector2);

See Sample code Run Code