fork download
  1. #include <vector>
  2. #include <iostream>
  3.  
  4. std::vector<int> V1 = { 1, 2 };
  5. std::vector<int> V2;
  6. std::vector<int> V3 = { 1, 1, 1, 1 };
  7.  
  8. int main()
  9. {
  10. for (auto* v : {&V1, &V2, &V3}) { std::cout << v->size() << std::endl; }
  11.  
  12. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
2
0
4