Everybody hi.
I need to swap elements of my std::vector container.
For example, i have vector with values from 1 to 5;
and i need to swap 2 with 3 (only nearby elements), that in result i'll have 1,3,2,4,5.
In real world i don't have std::vector filled with numbers - it filled with struct objects;
crioto 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.