Here is the source code for my simulation of Shor's algorithm. I have tried to document the code as well as possible, buy if you find something difficult please write me at mjhayward@google.com and I will attempt to explain it as well as I can. The code was compiled with g++ version 2.8.1, on a Pentium Pro 200 running Linux 2.0.33. I have also compiled it on a UltraSparc running SunOS 5.6 also using g++ 2.8.1, with one modification. I hope that you will find it easy to compile the code with g++. If you have trouble compiling please send me information about your compiler, OS, and error messages, and I will see what I can do.