How can I check if a string can be converted to a float?

前端 未结 7 1433
别那么骄傲
别那么骄傲 2021-01-15 04:38

First my context is that of a compiler writer who needs to convert floating point literals (strings) into float/double values. I haven\'t done any floating point programming

相关标签:
7条回答
  • 2021-01-15 05:03

    On MSVC you can use _atoflt(), defined in stdlib.h

    0 讨论(0)
提交回复
热议问题