![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++基础问题
文章平均质量分 70
fionachen33
这个作者很懒,什么都没留下…
展开
-
float精度问题
最近写一小程序,出现了一个莫名的问题,今天捣鼓了一天才发现是float的精度问题原来是这么写的: int Index = -1; for(int i=0; i<m_colorband.colors.size(); i++) { if ( (anchors.at(m_selectAnchorIndex).m_anchorPos ) == (m_colorband.m_colorPoss.原创 2015-06-18 16:51:12 · 1582 阅读 · 0 评论 -
CString”转换为“const char *
在VS中有时候会遇到类似错误: error C2664: “fopen_s”: 不能将参数 2 从“CString”转换为“const char *” 这是我们可以强制转换CString: (LPSTR)(LPCTSTR)str 为什么会出现这种错误呢?我们打开菜单中的“项目/项目属性/配置属性/常规“, 可以看到常规中的字符集为”使用Unicode字符集“,原因就在这里。 有两种方法原创 2015-07-28 12:44:26 · 605 阅读 · 0 评论