I got an error when I attempt to configure a project to target a 64-bit platform using Visual C++ Express Edition.I don’t know any other have these problems .My friends told me I did not Configure Visual C++ Projects to Target 64-Bit Platforms. To develop 64-bit applications I must install Visual C++64-bit compliers.To enable 64-bit tools on Visual C++ Express Edition,I should install the Windows Software Development Kit (SDK) in addition to Visual C++ Express Edition.
If you are new to Visual C++ on a 64-bit Windows operating system .you should know these below when you use Visual C++ to create applications to run on a 64-bit Windows operating system,otherwise ,errors will occur at any time .
1.Assign pointers to 64-bit variables and not 32-bit ones on 64-bit platforms, otherwise ,it will truncate the pointer value.
2.Had to recognize these values is 32-bit or 64- bit on 64-bit Windows Operating system .
32-bit value:int,long.
64-bit value:size_t,time_t,and ptrdiff_t.
3.
You couldn’t mistake where your code takes an int value and processes it as a size_t or time_t value. It is possible that the number could grow to be larger than a 32-bit number and data will be truncated when it is passed back to the int storage.
The %x (hex int format) printf modifier will only operate on the first 32 bits of the value that is passed to it.So you should pay attention to these:
1.Use %I32x to display an integer on a Windows 32-bit operating system.
2.Use %I64x to display an integer on a Windows 64-bit operating system.
3.The %p (hex format for a pointer) will work as expected on a 64-bit Windows operating system.
Above these ,I summed up the situations I knew.
If you find any other issues ,please share yours.