Exe file

Hi,
If write a program and create exe file, so this exe file can run on any computer?
The simple answer is "sometimes".

It will run on certain other computers, if they have compatible operating system and runtime environment.
+1 MikeyBoy.

@ OP: Sometimes is indeed the answer. There are things that you can do to maximize the portability of your application, and there are some run-time environments that are darn near ubiquitous. But C and C++ operate on too low of a level to guarantee 100% portability.
I'm a little confused.
I have windows 8.1 64-bit.
That means just can run exe file in windows 8.1 64-bit with any CPU model?
Thanks
It's way more complicated then that. As the author\programmer of the application you have a lot of control over a ton of settings. But you have to tell the linker and compiler what you want those settings to be. In addition to that, if you are using an M$ compiler then any PC running your application would need to have the appropriate Run Time Environment installed.

From Win 8 64 you are able to target pretty much any previous version of Windows. But you have to explicitly tell your tool chain what to do.
Topic archived. No new replies allowed.