Compile and run the program newnorcia.cpp. Does the result seem ok to you? Can you give an explanation?
If the Earth were a perfect sphere, the position vector would only have z component. However, the Earth in SPICE is modelled as an elipsoid, which means that its center doesn't belong anymore to the z axis of the COSPAR frame. The y component of the result vector is neglectable, but the x is not.