When you use a compiled language such as C, the size of the pointer is not determined by the platform on which you use your code: it depends only on the platform on which you compiled your code.
The 64-bit version of Windows 7 can run code compiled for 32-bit platforms. Judging by the conclusions of your program, it seems that your code has been compiled for Win-32.
In Visual Studio 2010 go to the properties page of your C / C ++ project and make sure that Active (x64) selected in the "Platform" drop-down list (by default it is Win32). If x64 not available in the drop-down list, click [Configuration Manager...] and select x64 for your project platform. If the "Copy from ..." dialog box [OK] , click [OK] to reject it. After recompilation, the program should work in 64-bit mode.
source share