When i tried to call a function in c++ ,it shows an ambiguous error,How can I solve this ?
Asked
Active
Viewed 43 times
-3

Jason
- 36,170
- 5
- 26
- 60
-
5code and error message should be as text in the question. – 463035818_is_not_an_ai Dec 16 '22 at 08:21
-
2`using namspapce std;` 20 keystrokes to save 15 keystrokes for the price of surprising errors. Hm... perhaps reconsider if it is worth it – 463035818_is_not_an_ai Dec 16 '22 at 08:23
1 Answers
0
Due to using the using namespace std;
You have an intersection with the std::greater
. This is the very lesson when you can understand that it is not advisable to use using namespace std;

AlexZel
- 83
- 1
- 5
-
I remove using namespace std; and use std:: in cout,in and endl and this solved my problem. Thank you sir – Gopal Adhikari Dec 16 '22 at 08:54