作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
函数 _wtol 将宽字符串转换为长字符串。问题是它不能用小数转换。我对 C++ 的了解不够,无法提出解决方法,所以有人可以建议一个解决方法或一个可以用小数转换的替代转换函数吗?
谢谢
void button_click(void) {
Edit_LimitText(edithwnd, 100); // edithwnd is a global hwnd
wchar_t editxt[100];
GetWindowText(edithwnd, editxt, 100); // say I typed 36.56 in the edit control
long lng = _wtol(editxt); // when I pause during debug and look at my locals, lng would equal 36, but I need it to equal 36.56
}
最佳答案
_wtof() 等。参见 here .
关于c++ - 使用 _wtol 与小数转换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5922907/
函数 _wtol 将宽字符串转换为长字符串。问题是它不能用小数转换。我对 C++ 的了解不够,无法提出解决方法,所以有人可以建议一个解决方法或一个可以用小数转换的替代转换函数吗? 谢谢 void bu
我是一名优秀的程序员,十分优秀!