This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS/MSP430I2041:msp430i2041

Guru**** 2024750 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/761335/ccs-msp430i2041-msp430i2041

器件型号:MSP430I2041

工具/软件:Code Composer Studio

尊敬的所有人:

我想将浮点型转换为字符串型。 现在、我将浮点型转换为整数型、并使用 sprintf 函数。

sprintf (随机、"%d"、p_results_1); 

我已经使用了"%g"和"%f"、但它不起作用。  

他们是否有任何方法来实现这一点?

谢谢。

此致

Neal

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    Neal、您好!

    请看下面的注释。 请告诉我这是否适合您。

    www.geeksforgeeks.org/.../