samedi 9 mai 2015

Is there a function to count number of parameters for a printf format string?

Say, if I do the following:

const char *strFmt = "Value=%d, str=%s, v=%I64d. Is 100%% true";
printf(strFmt, 1, "name", -1);

Is there a function that simply returns how many parameters are needed for strFmt without filling them in?

Aucun commentaire:

Enregistrer un commentaire