Info on printf("%g")

Jul 5, 2012 at 6:26pm
Hello,
I am working on a project and it has the following lines of code:
1
2
3
4
for(i = 0; i < n; i++)
{
 printf("%25.15g\n", d8[i]);
}


I have a general idea of what is being done but I do not understand what
printf("%25.15g\n", d8[i]); is doing. Can anyone shine some light on this line of code.
Thanks In Advance
Jul 5, 2012 at 6:49pm
Hi,

You could google "C++ printf example" to find out all about it. Google is your friend

The numbers are to do with field width & decimal places.
Jul 5, 2012 at 7:10pm
Thanks!!
Topic archived. No new replies allowed.