The typical definition of portability goes something like this:
Portability is a measure of how easily software can be made to execute successfully on more than one operating system or platform.
This definition, however, is only a starting point. To truly define the term portability, one must consider more than the mere fact that the software can be made to execute on another operating system. Consider the following C++ code:
Most readers will agree that the preceding code will compile and execute on just about any platform that supports a decent C++ compiler.
However, potential problems lurk, even in code as simple as this. Let’s ...