Re: using QuantLib interpolator

Posted by Peter Caspers-4 on
URL: http://quantlib.414.s1.nabble.com/using-QuantLib-interpolator-tp13863p13864.html

Hi Pavan,

this is quite nice http://www.boost.org/doc/libs/1_52_0/doc/html/boost_lexical_cast.html

kind regards
Peter

Am 04.01.2013 17:54, schrieb Pavan Shah:
how can i convert a string from my map to a Real that I can then use as a value in a vector <Real> to be passed into QuantLib's interpolator constructor.

for example
i have

string testvol = Input_Vols["GBPUSDV9M CMPN Curncy"].at(1);

 vector <Real> xvec (10), yvec(10);
xvec[0]=1; yvec[0]= atof(testvol);


this doesn't work.  should i be using something other than atof()?

It says "no suitable conversion function from string to const char *."

Input_Vols above is a map <srting <vector <string> > .

any ideas ?

thanks
Pavan


------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812


_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users