SyntaxFix
Write A Post
Hire A Developer
Questions
Since C++ 11, you could do the following:
for(const auto& student : data) { std::cout << student.name << std::endl; }