Hi all,
I have a function doing some calculations on a vector of doubles, and would like to return a vector (or more correctly a XLOPER structure). For some reason I can't get this simple test-code to work:
DLLEXPORT OPER *VectorTest(
OPER *Indata) {
boost::shared_ptr<ObjectHandler::FunctionCall> functionCall;
try {
std::vector<double> values=ObjectHandler::operToVector<double>(*Indata, "Indata");
std::vector<double> outdata;
for(int i=0; i<values.size(); i++) outdata.push_back(values[i]);
static OPER xRet;
ObjectHandler::vectorToOper(outdata, xRet);
return &xRet;
} catch (...) {
return 0;
}
}
All compiles and linkes nicely, and the add-inn seems to work, but Excel complains about #NUM when I try it.
All input appreciated!
Thanks!
Bjørn
--
Up, down, turn around
Please dont let me hit the ground
Tonight I think Ill walk alone
Ill find my soul as I go home.
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users