[Quote=引用 10 楼 squiffy 的回复:]
引用 9 楼 roman_v 的回复:
Common Visual C++ 64-bit Migration Issues
When you use Visual C++ to create applications to run on a 64-bit Windows operating system, you should be aware of the following issues:
*
An int and a long are 32-bit values on 64-bit Windows operating systems. For programs that you plan to compile for 64-bit platforms, you should be careful not to assign pointers to 32-bit variables. Pointers are 64-bit on 64-bit platforms, and you will truncate the pointer value if you assign it to a 32-bit variable.
*
size_t, time_t, and ptrdiff_t are 64-bit values on 64-bit Windows operating systems.
这个说的很清楚了:
1、指针不要赋值给32位的变量。
2、size_t,time_t and ptrdiff_t是64bits。
[Quote=引用 9 楼 roman_v 的回复:]
Common Visual C++ 64-bit Migration Issues
When you use Visual C++ to create applications to run on a 64-bit Windows operating system, you should be aware of the following issues:
*
An int and a long are 32-bit values on 64-bit Windows operating systems. For programs that you plan to compile for 64-bit platforms, you should be careful not to assign pointers to 32-bit variables. Pointers are 64-bit on 64-bit platforms, and you will truncate the pointer value if you assign it to a 32-bit variable.
*
size_t, time_t, and ptrdiff_t are 64-bit values on 64-bit Windows operating systems.
[/Quote]
这个说的很清楚了:
1、指针不要赋值给32位的变量。
2、size_t,time_t and ptrdiff_t是64bits。
When you use Visual C++ to create applications to run on a 64-bit Windows operating system, you should be aware of the following issues:
*
An int and a long are 32-bit values on 64-bit Windows operating systems. For programs that you plan to compile for 64-bit platforms, you should be careful not to assign pointers to 32-bit variables. Pointers are 64-bit on 64-bit platforms, and you will truncate the pointer value if you assign it to a 32-bit variable.
*
size_t, time_t, and ptrdiff_t are 64-bit values on 64-bit Windows operating systems.