stl入门--reverse函数

#include<iostream>
#include<algorithm>         
using namespace std;
int main()
{
    char a[]="0123456789";
    int len=strlen(a);
    reverse(&a[0],&a[6]);        //a[6]没参加reverse
    for(int i=0;i<10;i++)
        cout<<a[i]<<" ";
    return 0;
}

原文地址:https://www.cnblogs.com/hutao886/p/5162010.html