problem compiling a simple EuropeanOption program : include issue ?
Posted by davide ricci on
URL: http://quantlib.414.s1.nabble.com/problem-compiling-a-simple-EuropeanOption-program-include-issue-tp4636.html
Dear all,
I'm trying to write from scratch a simple Monte Carlo program to
evaluate an EuropeanOption. I'm experiencing a couple of problems :
a)
Option::Type type(Option::Call);
std::cout << "option type = " << type << endl;
I always obtain 0 for the type variable.
b) std::cout << "Risk-free interest rate = " << io::rate(riskFreeRate)
<< std::endl;
I obtain the following error :
"programmi/finance/test1/src/test1.cpp:60: error: `io' undeclared (first
use this function)
programmi/finance/test1/src/test1.cpp:60: error: (Each undeclared
identifier is reported only once for each function it appears in.)
programmi/finance/test1/src/test1.cpp:60: error: parse error before `::'
token
/programmi/finance/test1/src/test1.cpp:67: error: parse error before
`::' token
"
I suppose I'm forgetting some includes...but which ones ?
All the best,
davide