|
发表于 2016-4-18 14:46:15
|
显示全部楼层
%f不会自动的类型转换,所以它就···
- 7: printf("%f\n", 123);
- 00401028 push 7Bh [color=Red]; 这个就是你的数字 123[/color]
- 0040102A push offset string "%f\n" (0042601c)
- 0040102F call printf (00401090)
- 00401034 add esp,8
- 8: printf("%f\n", (double)123);
- 00401037 push 405EC000h [color=Red]; 这两个[/color]
- 0040103C push 0 [color=Red]; 这两个,就是一个double的表示[/color]
- 0040103E push offset string "%f\n" (0042601c)
- 00401043 call printf (00401090)
- 00401048 add esp,0Ch
- 9: printf("%f\n", 123.0);
- 0040104B push 405EC000h ;这里弄个.0 编译器就认为他是double了
- 00401050 push 0
- 00401052 push offset string "%f\n" (0042601c)
- 00401057 call printf (00401090)
- 0040105C add esp,0Ch
复制代码
|
|