Returns the X axis acceleration in mG (1/1000ths of the gravitational constant) from the last read().
Where Accelerometer is the name you have given to the device in Project Designer.
Assuming you have called the sensor 'myAccel' in Project Designer you can dump the value to the standard output device as follows:
ACCEL_TYPE x = myAccel.getX();
ACCEL_TYPE y = myAccel.getY();
ACCEL_TYPE z = myAccel.getZ();
cout << "X=" << x << " Y=" << y << " Z=" << z;