Ising C++ code finished