Here is included the 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 email@example.com and I will attempt to explain it as well as I can. The code was originally compiled in 1999 with g++ version 2.8.1 on a Pentium Pro 200 running Linux 2.0.33, and had also been compiled it on a UltraSparc running SunOS 5.6 also using g++ 2.8.1, with one modification.
Since then, the code has been updated to compile with gcc/g++ 4.8.2 and GNU Make 3.81. 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.