template <class BidirectionalIterator>
  void reverse ( BidirectionalIterator first, BidirectionalIterator last);

如果不是改变原来的容器,而是翻转之后放在新容器里面,直接用reverse_copy ( BidirectionalIterator first,
                                BidirectionalIterator last, OutputIterator result );

std::reverse(trianglePoints.begin(), trianglePoints.end());


Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐