"C++ isn't cross platform"

As my C++ book tells me C++ programs can only be used on the specific CPU and OS you compiled it on but yet I made a few programs and sent them around to my friends and they work fine >.<
closed account (1vRz3TCk)
If you compile your program to run on say Windows and send the program to me it will not run on my Mac but probably would run on my Windows PC.
Yes but it states that it can only run on the specific CPU that you compiled it on, as for the OS thing that's just common knowledge.
Not the CPU you compiled it for, but the CPU architecture you compiled it for.
On PCs, x86 and x86_64 are the relevant architectures.
So as long as they're running Windows it's compatible?
Most likely (if you compiled for x86 (aka 32-bit)). Although I heard Windows 7 supports ARM now (or is supposed to sometime in the future), so your program wouldn't run on an ARM machine, even if it runs Windows.
Topic archived. No new replies allowed.