I am sumbitting these program on other compliers and online ides it is giving the correct outhput without any error but it is giving error only here.Program is to form the biggest number

Hi @Nitishkumar9711,
in ur mycompare function, try using
“(yx.compare(xy)>0 ?0:1)” instead of “(yx.compare(xy))”
compare function returns integer >0,0,<0 after comparing strings and all numbers except 0 are considered as true hence even if xy>yx or xy<yx, it will return true. if xy=yx, compare returns 0 which is interpreted as false. so if we use “(yx.compare(xy)>0 ?0:1)” we are trying to return true i.e 1 only when yx>xy else we return false i.e 0
hope this resolves ur doubt.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.