set parameters? (cin>>Real not working)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

set parameters? (cin>>Real not working)

sijianglv
Hello all,

Sorry for this rookie question and thank you in advance for your time.

For example in EquityOptionPricing example, what I want is I could set rate, for example, as input. Basically if it is int I would simply use 
int rate;
cin >> rate;

But since now rate is "Real", which is a Quantlib defined class, it looks like >> operator is not overloaded in this class 

Any idea is truly welcome. 



------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: set parameters? (cin>>Real not working)

Luigi Ballabio
Did you try it? Real is just a typedef to double, it should work as you describe.

Luigi

On Fri, Oct 24, 2014 at 10:01 AM, sijianglv <[hidden email]> wrote:
Hello all,

Sorry for this rookie question and thank you in advance for your time.

For example in EquityOptionPricing example, what I want is I could set rate, for example, as input. Basically if it is int I would simply use 
int rate;
cin >> rate;

But since now rate is "Real", which is a Quantlib defined class, it looks like >> operator is not overloaded in this class 

Any idea is truly welcome. 



------------------------------------------------------------------------------

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




--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------

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