C2563, C2568, but there is only one function implementation

Joined
2/14/23
Messages
659
Points
223
I'm getting errors associated with an improper overload but there is only one instance of this function in my solution. Infuriating. Anyone know what I'm doing to trip the compiler?

It runs fine until I try to evaluate the function, shown in the second picture. Not shown is the instantiation of func1. It's up to scratch, and has been used for a dozen previous identical implementations of different functions.

C2568: improper overloading of function.
C2563: Also a kind of improper overloading, but dealing explicitly with the parameter setup.

Difference between the error messages is vague.
 

Attachments

  • Screenshot 2024-09-05 at 11.21.17 PM.webp
    Screenshot 2024-09-05 at 11.21.17 PM.webp
    195.5 KB · Views: 10
  • Screenshot 2024-09-05 at 11.28.47 PM.webp
    Screenshot 2024-09-05 at 11.28.47 PM.webp
    65.2 KB · Views: 9
OK, well, that is annoying. First serious slip up since transitioning back to cpp from python.

Line 139, I used ',' to separate two objects passed to cout. changing ',' to '<<' fixed the issue. It had nothing to do with overloading. That error message needs tuning. Not sure how that works though. I'll leave this here in case a future QN coder runs into one of these errors.
 
Back
Top