logprintf syntax

  • Thread starter Thread starter Anna Smidt
  • Start date Start date
A

Anna Smidt

About logprintf syntax: I am not sure if I understand it correctly:

logprintf("\n[nTotalImages %d nGoodImages %d "
"Mean times: FaceDet %.3f AsmSearch %.3f Both %.3f secs]\n",
nTotalImages, nGoodImages,
TotalDetTime / nGoodImages, TotalAsmTime / nGoodImages,
MeanTime);

My ideas:
\n stands for "new line", yes?
..3f stands for a a number with 3 decimal places, yes?
and the % which occurs 5 times in the sample above stands for 5
variables which can be found in the second argument of logprintf, yes?

Anna
 
About logprintf syntax

Anna,

What's logprintf - something of your own making?

Assuming it's a wrapper you have for some printf formatting...
\n stands for "new line", yes?
Yes.

.3f stands for a a number with 3 decimal places, yes?

a precision of .3 with type f (floating point value) means 3 decimal
places.
and the % which occurs 5 times in the sample above stands for 5
variables which can be found in the second argument of logprintf, yes?

Yes.

You can find an explanation for all these points in the MSDN article
"Format Specification Fields: printf and wprintf Functions"

Dave
 
Back
Top