I was trying to do the first easy problem named as “twoSum” in LeetCode but as i was trying to run the code it is showing my different error as i was changing the code.
I even used the class Solution but it dit not even work.
My code is working completely fine in the compiler but not in LeetCode.
The error I am getting is
" Line 36: Char 43: error: too many arguments to function call, expected 0, have 2
36 | vector<int> ret = Solution().twoSum(param_1, param_2); return ret;
| ~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~
Line 7: Char 10: note: 'twoSum' declared here
7 | void twoSum() {
| ^
^ "
I just want to know why it is not working ?
I have tried every thing but a new error showup every time, Just want to get some guidence in this case.
Abhay Raj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1