Form biggest number: What's the error in the code?
Hello @sanya2508,
There are many issues with your program:
-
The input format is wrong
Solution:
Read the question properly -
You are not creating an array of string but printing an array
-
The return type of the compare function should be bool
Solution:
bool Compare(string X, string Y){} -
You have to pass iterator for string in sort function.
Solution:
sort(arr.begin(), arr.end(), Compare);
Hope, this would help.
Give a like, if you are satisfied.