I'm trying to code Put-Call Parity function in CallOption and PutOption derived class. I'd like this function passes the reference of the object as argument.
This is the signature of the function in the CallOption.hpp
double PCParity(const PutOption& put_option) const;
and similarly in PutOption.hpp
double PCParity(const CallOption& call_option) const;
I, of course, included CallOption.hpp in PutOption.hpp and reciprocally.
But I get the following errors:
- identifier 'PutOption' is undefined.
- missing type specifier - int assumed. Note C++ doesn't support default-int.
- syntax error: missing ',' before &
Does it mean that I cannot call two derived classes simultaneously at the compiling time?
Any help is very much appreciated. :(