遍历的几种方式

  • 范围for
  • for循环
  • end(a),begin(a)

size_t的理解

unsigned int 值,防止下标越界

:::tips 数组的大小( 必须是size_t类型) size = end(a) - begin(a) :::

例子

image.png

image.png