I updated both the float3dreg and float2dreg.cc files so that outputs are written to the .H files via the correct axes. Before everything was switched. Now, just use an array in the program such that array[axis3][axis2][axis1] as per standard C++ convention. When you make the output hypercube, then you will initialize in a manner like: std::shared_ptr hyperOut(new hypercube(axis1, axis2));