What is the difference between greater () and less () in ios
This article mainly introduces what is the difference between greater () and less () in ios. It is very detailed and has certain reference value. Friends who are interested must finish it!
Greater ()
Greater is a big meaning and is used in ascending order
Less ()
Less means less and is used to sort in descending order
# include
Using namespace std
Int main ()
{
Ios::sync_with_stdio (false)
Int a [] = {0recollection 1, 4, 7, 2, 5, 8, 3, 6, 9}
Int n=sizeof (a) / sizeof (int)
Sort (aformaine); / / sort from smallest to largest by default
For (int iTuno Bandi)