vs2003太差劲了,int num = 100 * 0.02f 居然等于1,而VS2008就正常.
如题..........
[解决办法]
[解决办法]
楼主浮点问题的答案在这里http://msdn.microsoft.com/en-us/library/e7s85ffb(v=vs.90).aspx
With /fp:precise on x86 processors, the compiler will perform rounding on variables of type float to the proper precision for assignments and casts and when passing parameters to a function.
意思是/fp:precise使得编译器搞舍入(rounding),而不是所谓严格的(strict)计算
vs2008下默认是/fp:precise,如果设置成/fp:strict,结果就与vs2003一样了
[解决办法]
2003有对6.0的程序进行一些兼容
而6.0 C++标准还没出生呢
所以
for(int i;;)
...
这种东西出来到外面还能用是正常的
还有vector的实现与2005之后的也不一样
2003 --vec.begin(),就会变成 vec.end()
迭代器删除之后 一个--iter还能接得回去不会失效
vec._MyFirst可以直接拿出来用
还可以调试HLSL
这些到了2005就全部修改了
不是差劲 只是一些东西调整了而已
都啥年代了 早该换了...