Best way to iterate through struct members of the same type?

1
2
3
4
5
6
7
8
9
struct Times
{
int inputTime;
int updateTime;
int drawTime;
};

//iterate through each one, checking whatever needs to be check, etc


not the exact example i'm trying to do. in place of int's I have sf::Time's. i then check if i should print them as microseconds, milliseconds, or seconds. then I print.
Last edited on
Iterating through them is easier if you store them in an array (or some other container).
you can only iterate through collections. If your data is all separate items then they will all need processing separately.
Last edited on
Topic archived. No new replies allowed.