When you write code, you have to have a target platform (for example: Linux, Mac, Windows 9*) in mind. While basic C++ (such as "Hello World" should compile the same on almost any platform without changes, there are many features that will not work on some systems. For example, I could write a program for linux that looks at a file's ownership and permissions to determine how to treat the file when it is opened - this wont work on a windows system, since windows doesn't have file permissions or ownerships. This is even more of a problem id I want to use any platform specific APIs: a program that uses graphics under windows 98 wont work with X-Windows, because the interfaces are different.

There are a lot of attempts to get around this problem - either with a band-aid solution like WINE (allowing windows software to run on linux systems) or with (theoretically) platform independant languages like JAVA (which emulates a computer that can run JAVA nativly). So far there is no perfect solution: Solutions like WINE are very specific, and solutions like JAVA are inefficient.