I need to sort a C++ std::vector<std::string> fileNames. The fileNames are labeled as such
YYDDDTTTT_Z_SITE
YY = Year (i.e 2009 = 09, 2010 = 10)
DDD = Day of the year (i.e 1 January = 001, 31 December = 365)
TTTT = Time of the day (i.e midnight = 0000, noon = 1200)
ZONE = Will be either E or W
SITE = Four letter site name (i.e HILL, SAMM)
I need the strings to be sorted by the following order: ZONE, SITE, YY, DDD, TTTT
Use
std::sortwith a comparison function.(The link has a nice example)