Re: Put in a string the result of optimization

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Put-in-a-string-the-result-of-optimization-tp8119p8120.html

On Mon, 2011-03-21 at 12:25 +0100, Francesco Perissin wrote:
> Hi all,
> I need to put in a string the resulting message of an optimization
> problem. The message is available as an ostream by invoking the <<
> operator applied to an EndCriteria::Type object.

Ciao Francesco,

#include <sstream>

std::ostringstream out;
out << end_criteria;
std::string s = out.str();

See you,
        Luigi




--

Weiler's Law:
Nothing is impossible for the man who doesn't have to
do it himself.



------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users