博客链接:

 

注意

const vector <int> vec(10) —— 与const int a[10]是一回事,意思是vec只有10个元素,不能增加了,里面的元素也是不能变化的。const vector <int>的迭代器为const vector <int>::const_iterator
vector <const int> vec(10) —— 好像没有这种用法(vs2017无法通诺编译)

相关文章:

  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2021-09-11
  • 2021-11-21
  • 2022-12-23
  • 2021-07-13
  • 2021-06-01
猜你喜欢
  • 2021-07-29
  • 2022-01-11
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2021-06-07
相关资源
相似解决方案