logprintf syntax

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
 
D

David Lowndes

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top