开发者

Getting strange output from printf

开发者 https://www.devze.com 2023-03-12 18:13 出处:网络
What causes StringCchPrintfW(buf, buflen, L\"%f\", double_var) to output \"-1.#IO\" in Windows Mobile? I am also getting \"-1.#IND\" sometimes. Documentation mentions \"1.#INF\" and \"-1.#INF\" where

What causes StringCchPrintfW(buf, buflen, L"%f", double_var) to output "-1.#IO" in Windows Mobile? I am also getting "-1.#IND" sometimes. Documentation mentions "1.#INF" and "-1.#INF" where #IN开发者_Go百科F means infinity, but there is no mention of "#IO" or "#IND".


You're missing the first two parameters to the function. StringCchPrintf formats to a string which you need to provide rather than printing it.

0

精彩评论

暂无评论...
验证码 换一张
取 消