Using floats with sprintf() in embedded C

后端 未结 13 1842
别跟我提以往
别跟我提以往 2020-12-24 06:35

Guys, I want to know if float variables can be used in sprintf() function.

Like, if we write:

sprintf(str,\"adc_read = %d \         


        
13条回答
  •  攒了一身酷
    2020-12-24 07:06

    Look in the documentation for sprintf for your platform. Its usually %f or %e. The only place you will find a definite answer is the documentation... if its undocumented all you can do then is contact the supplier.

    What platform is it? Someone might already know where the docs are... :)

提交回复
热议问题