I have a list
list<pair<Zeitpunkt, double>> l_tempdiff;
And I only want to cout
the first 5 elements.
I only know the way of couting the whole list with:
for (auto elem : l_tempdiff)
{
cout << elem.first << elem.second << endl;
}
I dont know how to acces my elements when I use:
for (it = l_tempdiff.begin(); it != l_tempdiff.end(); ++it)
{
}
And I guess I need to change the l_tempdiff.end()
to some other value but it doesnt seem to take just the number
5`. How can I do this?