标签:new margin cto ever ali idt family end table
方法一:使用vector自带的反转迭代器reverse_iterator,rbegin(),rend()
vector<int>::reverse_iterator riter; for (riter=arrayInt.rbegin();riter!=arrayInt.rend();riter++) { ????arrayRever.push_back(*riter); } |
? ?
方法二:使用<algorthm>中的reverse()
arrayRever=arrayInt; reverse(arrayRever.begin(),arrayRever.end()); |
?
标签:new margin cto ever ali idt family end table
原文地址:https://www.cnblogs.com/audacious/p/12236942.html