#include <vector>
#include <iostream>
#include <iterator>
#include <algorithm>
using namespace std;
int main()
{
    vector<int> v{1,2,3};
    reverse(begin(v), end(v));//反转容器元素顺序 
    for(auto e : v) cout << e;
    cout << '\n';
 
    int a[] = {4, 5, 6, 7};
    reverse(begin(a), end(a));//反转容器元素顺序 
    for(auto e : a) cout << e;
}

 

相关文章:

  • 2022-12-23
  • 2022-01-24
  • 2022-01-29
  • 2021-08-29
  • 2021-07-17
  • 2021-12-11
  • 2022-02-19
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
  • 2021-07-27
  • 2022-01-28
  • 2022-01-20
  • 2022-12-23
相关资源
相似解决方案