Just starting out with OOP. Experiencing an error when calling the parameter constructor in my source file:
Error C2511 'EuroVanillaOption::EuroVanillaOption(const double,const double,const double,const double,const double)': overloaded member function not found in 'EuroVanillaOption' Euro option calculator.
What is the reason for this? Is it something to do with the name of the file or class object?
Additionally, in VScode, a green squiggly line warning shows under the header declaration for the parameter constructor, saying "Function definition for EuroVanillaOption not found", is this a related issue?
Finally, there is an error at the end of the preprocessor directive, which defines the name _Euro_Vanilla_Option_H
saying "expected a declaration", why?
...
EuroVanillaOption::EuroVanillaOption(const double _s, const double _K,
const double _T, const double _r,
const double _sigmaVOL) {
s = _s;
K = _K;
T = _T;
r = _r;
sigmaVOL = _sigmaVOL;
}
header declaration
public:
EuroVanillaOption();
EuroVanillaOption(const double& _s, const double& _K,
const double& _T, const double& _r,
const double& _sigmaVOL);