fork download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. int main() {
  6. int array[] = {1,2,3};
  7. std::vector<int> foo( std::begin( array ), std::end( array ) );
  8. for ( auto & n: foo )
  9. {
  10. std::cout << n << std::endl;
  11. }
  12. return 0;
  13. }
Success #stdin #stdout 0s 4176KB
stdin
Standard input is empty
stdout
1
2
3