c++ create object for loop code example Example: c++ loop trhought object for (auto const& i : data) { std::cout << i.name; }