• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

C2563, C2568, but there is only one function implementation

Joined
2/14/23
Messages
650
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: 7
  • Screenshot 2024-09-05 at 11.28.47 PM.webp
    Screenshot 2024-09-05 at 11.28.47 PM.webp
    65.2 KB · Views: 7
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