// Shows initialization together with auto. // Best to use = for initialization of variables of auto type. // Problems in this example. #include void f(){ auto x {101}; // x is an object of type initializer_list: A list with a single element. // problems here... Does not compile. std::cout << "x: " << x << std::endl; // OK - x is a list: for(auto element: x){std::cout << element;}; // 101 } int main(){ f(); }