Alternative to boost::lexical_cast

后端 未结 7 1147
粉色の甜心
粉色の甜心 2020-12-30 06:27

I\'m taking a part in a challenge, and just to cut to the point, in one of places in my program I need to convert string to an integer. I\'ve tried boost::lexical_cast but u

7条回答
  •  粉色の甜心
    2020-12-30 06:50

    strtol can be a better atoi (specifically w.r.t. error handling), and will be faster than lexical_cast.

提交回复
热议问题