Posted by
rm-22 on
URL: http://quantlib.414.s1.nabble.com/Possible-bug-in-Examples-EquityOption-EquityOption-cpp-tp7982p7986.html
Yan Kuang wrote:
> Oh, I can see the line now when write seconds:
>
> std::cout << std::fixed << std::setprecision(0)
> << seconds << " s\n" << std::endl;
>
> Thanks!
Yes, problem solved, thanks also from me to Bojan.
Yan, FYI: I'm using Linux and g++, using no graphical IDE yet
for QuantLib projects, although have Eclipse installed.
> Bojan Nikolic <
[hidden email]>
> 04/09/2009 05:33 PM
>
> To
> Yan Kuang <
[hidden email]>
> cc
> "Ralf M." <
[hidden email]>,
[hidden email]
> Subject
> Re: [Quantlib-users] Possible bug in
> Examples/EquityOption/EquityOption.cpp
>
>
>
> Yan Kuang <
[hidden email]> writes:
>
>> So it's a problem of 'cout', I can's see any wrong usages of 'cout' in
> the
>> code, but I am no expert on the 'cout'
>
> The problem is in the
>
> std::cout << std::fixed << std::setprecision(0)
>
> line which sets the precision of printed numbers to zero. You need a
> corresponding line at the top like
>
> std::cout << std::fixed << std::setprecision(7)
>
> to set the cout system to print some decimal digits.
>
> Best,
> Bojan
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-july_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users