You can do it like that
for (int i = 0; i < present.size(); ++i)
cout << present[i]->id << " ";
or in C++11
for (auto p : present)
cout << p->id << " ";
I hope it helps
solved Displaying the elements of a vector of structure [closed]