With C++ or any other native-code technology, the only way to develop software which runs on different platforms would be development of separate versions for each of the supported
instruction-set architectures. Also, note that there is no a single 64-bit architecture. There are x86-64 and IE64 (Itanium). There are different and incompatible with each other:
http://en.wikipedia.org/wiki/X86[
^],
http://en.wikipedia.org/wiki/X86-64[
^],
http://en.wikipedia.org/wiki/Itanium[
^].
At the same time, you can compile all code to x86-32. It will be compatible with all the systems and will be run under WoW64 on Windows:
http://en.wikipedia.org/wiki/WoW64[
^].
All software components loaded in the same process should be compiled to the same architecture; you cannot combine then even if each of them separately is compatible with the target system.
If you develop separate versions of all the software component for the architectures you want to support, if you want, you can integrate then in a single package that would behave as architecture-agnostic. For example, you can create a startup module compiled to x86-32 (to be executed on WoW64 on 64-bit platform). It can detect the target CPU architecture and start the application process using executable module(s) compiled exactly for this architecture.
That was about native-code architecture. If you want to develop using .NET (you could do it using C++/CLI dialect of C++, which is standardized under ECMA-327), you can use the target "pseudo-architecture" called "AnyCPU". Such architecture is possible because you compile the code into IL code, which is additionally compiled to CPU instructions using
JIT compilation. Please see:
http://en.wikipedia.org/wiki/C%2B%2B/CLI[
^],
http://www.ecma-international.org/publications/standards/Ecma-372.htm[
^],
http://en.wikipedia.org/wiki/Just-in-time_compilation[
^],
http://en.wikipedia.org/wiki/Common_Language_Infrastructure[
^],
http://en.wikipedia.org/wiki/Common_Language_Runtime[
^].
—SA