• 4511阅读
  • 3回复

pay attention to a small thing in cross platform programming [复制链接]

上一主题 下一主题
离线steinlee
 

只看楼主 倒序阅读 楼主  发表于: 2009-01-30
— 本帖被 XChinux 执行加亮操作(2009-01-30) —
If you use Qt, often it means that you are developing cross platform applications. One thing that can annoy you and your customers is that your code works on one platform and does not work on another one. One little evil is that your variables are not initialized automatically(on some platforms) and set to junk which can bring your code down. Therefore, a good habit is that always initialize all your variables with some values which make some senses. It is hard to find this type of bugs. In this way you can save a lot of time.
[ 此贴被steinlee在2009-01-30 04:14重新编辑 ]
Looking for remote C/C++ and Qt 兼职
离线steinlee

只看该作者 1楼 发表于: 2009-02-12
Two places:
1. initialize all class variables in constructors
2. initialize all functions variables where they are defined.

You will not hate it if you do it. Especially on Windows.
Looking for remote C/C++ and Qt 兼职
离线wd007

只看该作者 2楼 发表于: 2009-02-12
有机会试一下这个问题
欢迎访问我的博客,一起学习提高
http://blog.csdn.net/qter_wd007
离线duanlin
只看该作者 3楼 发表于: 2009-02-12
thanks . I will.
快速回复
限100 字节
 
上一个 下一个