Hi, You should first create the desired cl_print_flags object and then pass it as reference to the print_float function, like this: cl_print_flags flags; flags.float_readably = true; print_float(std::cout, flags, x[i]); Note also that stdout is not a C++ stream. I've replaced it with cout. -richy. -- Richard B. Kreckel <https://in.terlu.de/~kreckel/> On 10.02.20 05:38, Po-Hsun Tseng wrote:
#include <cln/io.h> #include <cln/float.h> #include <cln/float_io.h> using namespace cln; int main( ) {
int N = 10; cl_F x[N]; for (int i=0 ;i<N;i++) x[i] = "0.333333333333333333333333333333333333333333333333333333333333"; // cl_print_flags.float_readably = true; for (int i=0 ;i<N;i++) print_float(stdout, cl_print_flags.float_readably, x[i]); return 0 ; }