OK so I've heard of sorting structs and I've heard of sorting objects based on attributes, but could someone explain how I would sort objects based on a struct attribute?
I have a vector of nodes "nodevector", that I wish to sort from smallest to largest. I want to sort this vector based on the attribute "tm time". I have a function available to sort time, smallTime(time1, time2), which compares two times and returns true if time 1 is smaller than time 2 and returns false otherwise.