+ 1

How do you compare elements in an array (i.e greater than, less than... etc)?

29th Jun 2018, 3:32 PM
StEvEn
StEvEn - avatar
2 Réponses
+ 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.
29th Jun 2018, 4:14 PM
Bebida Roja
Bebida Roja - avatar
+ 1
okay please show me an example, because i want to get the highest integer in my array and assign it to a variable
30th Jun 2018, 7:08 AM
StEvEn
StEvEn - avatar