Skip to content

Instantly share code, notes, and snippets.

@meshell
Created February 22, 2016 21:32
Show Gist options
  • Save meshell/08dc2464495d0663ac77 to your computer and use it in GitHub Desktop.
Save meshell/08dc2464495d0663ac77 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <vector>
int main() {
std::vector<int> v = {0, 1, 2, 3, 4, 5};
for(const auto& i : v) {
std::cout << i << ' ';
}
std::cout << '\n';
int a[] = {0, 1, 2, 3, 4, 5};
for(const auto& n : a) {
std::cout << n << ' ';
}
std::cout << '\n';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment