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