Hi I am trying to input data from a text file into a struct. The problem I am having is how do we sort an entire struct so that the one with the lowest integer is first?
Here is data that I have inputted into the struct of array:
As you can see I want it so that the order is Blue, Red, and Green. So that when I type in cout >> Color.name >> " " >> Color.num; it will output "Blue 1" instead of "Red 50"