+ 1
How do you compare elements in an array (i.e greater than, less than... etc)?
2 Answers
+ 1
in C++, there is a library called "algorithm", which has the sort function it it. This function has an optional attribute (a function) which can tell how two elements compare.
+ 1
okay please show me an example, because i want to get the highest integer in my array and assign it to a variable