W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
#include
#include
using namespace std; int main() { // 创建字符串向量 cars vector
cars = {"Volvo", "BMW", "Ford", "Tesla"}; // 使用反向迭代器遍历向量 for (auto it = cars.rbegin(); it != cars.rend(); ++it) { cout << *it << "\n"; } return 0; }