I remember seeing a C++ (Borland) book that was entirely about building a flight simulator. Google is betraying my attempts to find it though, and i'm not sure who the actual publisher was. That was during the 90's when I was 14 or something so it was a bit above my head, but I remember almost buying it anyway.
Edit: It may have been this: https://www.amazon.com/Build-Your-Own-Flight-Sim/dp/15716902...