How would you sort the integers 4, 2, 6?Your code compares the values, but it doesn't sort them. How do you sort the stuctures?
How would you sort the integers 4, 2, 6?Your code compares the values, but it doesn't sort them. How do you sort the stuctures?
laserlight is right, if you're going to use C++, for heavens sake use std::sort().