#include <iostream>
#include <list>
using namespace std;
int main()
{
// int x[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; // ok
list<int> s = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; // ok
for(auto& n : x)
cout << n << endl;
/*
for(int i = 0; i < 10; i++)
cout << x[i] << endl;
*/
}
int main()
{
// int x[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; // ok
list<int> s = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; // ok
for(auto& n : s)
cout << n << endl;
/* 위와 동일한 표현이다.
for(auto p = being(s); p != end(s); ++p)
auto& n = *p;
cout << n << endl;
*/
}