c++ for array code example
Example 1: array syntax in c++
int foo [] = { 16, 2, 77, 40, 12071 };
Example 2: for loop with array c++
int v[] = {1,2,3,4,5};
for (int n : v)
cout << n << endl;
//make sure to compile with -std=c++11
int foo [] = { 16, 2, 77, 40, 12071 };
int v[] = {1,2,3,4,5};
for (int n : v)
cout << n << endl;
//make sure to compile with -std=c++11