float fX, fY, fZ = 0;

This line declares the varibles fX and fY, but it on initizlizes fZ.

You need to seperate the variables out.

float fX = 0;
float fY = 0;
float fZ = 0;