converting a string into a double

后端 未结 4 1349
感动是毒
感动是毒 2020-12-12 00:28

I am looking for a way to get floating point input from a user.

My way of going about this is to use a self-made getstrn function and plug that into another function

4条回答
  •  囚心锁ツ
    2020-12-12 01:01

    Use strtod, that's what it's for. And fgets can replace your safeGetString function.

提交回复
热议问题