The solution to this question is very easy: Vectors
std::vector<int> vector;
for(int i = 0; i < 10;i++)
{
vector.push_back(i);
}
std::reverse(vector.begin(), vector.end());
Voila! You are done! =)
Solution details:
This is the most efficent solution: Swap can't swap 3 values but reverse definitely can. Remember to include algorithm. This is so simple that the compiled code is definitely not needed.
I think this solves the OP's problem
If you think there are any errors and problems with this solution please comment below