Separately defining the first element of the x array to unity in the Bessel J1 Fortran test code I had posted earlier was only to include a simple-minded check on the computed result that would also ensure the compiler would not optimize away the calculation.
You copied the same approach with the first element definition in your C++ code but you didn’t do anything with the calculated results the way I showed in the Fortran code above, that was strange.