#define SOUND_SPEED 0.034; int rtt; //round trip time in microsecond double distance; distance = (double)(rtt*SOUND_SPEED)/2;
It complains erro
Drop the semicolon:
#define SOUND_SPEED 0.034; ^
If you keep it the generated code will look like this:
distance = (double)(rtt*SOUND_SPEED;)/2; ^