Program to reverse a vector without using a temporery variable.
komal.Sam 0 Newbie Poster
Recommended Answers
Jump to PostSTL provides you with the reverse() algorithm.
I.e.std::reverse(your_vector.begin(), your_vector.end());
You need to #include <algorithm> to make it compile.
All 3 Replies
Reply to this topic 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.