How do I convert a CString to a double in C++?

后端 未结 4 841
被撕碎了的回忆
被撕碎了的回忆 2021-02-07 12:39

How do I convert a CString to a double in C++?

Unicode support would be nice also.

Thanks!

4条回答
  •  梦如初夏
    2021-02-07 13:12

    with the boost lexical_cast library, you do

    #include 
    using namespace boost;
    
    ...
    
    double d = lexical_cast(thestring);
    

提交回复
热议问题