It should work to send it to someone using the same version of OS X and the same computer chip as you. It may even be possible on OS X to cross-compile to a universal binary that works on Intel and PowerPC chips, but you'll still be limited to OS X.
To get a working executable for Linux, you'll need to compile it on Linux (or use a cross-compiler, but that could be more difficult than it's worth, especially if you have to do it repeatedly).
Or, as has been said already, you could just distribute the source code and let people compile it themselves. This may be the best approach, because C++ has no common binary format, so if different people use different compilers that have different forms of name-mangling, they'll all still get a program that works (if they compiled OpenGL or GLUT with one C++ compiler and then you compiled your program with another, they might not work together (I think)).