C++ code for 3-bodies simulation