#define SOUND_SPEED 0.034; int rtt; //round trip time in microsecond double distance; distance = (double)(rtt*SOUND_SPEED)/2;
It complains erro
You're using C, but you're trying to use a C++ style // comment. Depending on your compiler, that may not be allowed.
//
Edit: In fact, gcc -c89 -ansi gives that exact error message for a // comment and a totally different one for the extraneous ; in the define.
;