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