'class SharpIR'has no member named 'distance'

Hi,
when registering as a new user in the forum, did you read the topic
" How to get the best out of this forum "?
If you haven't read it, I recommend you do!
If you read it, you must have understood that to post code you must use the </> tags.
I recommend that you edit your topic and put it in tags.

This library you are using does not have a distance() method
used in other lines like this "
const int dis1=SharpIR_1.distance(); //RIGHT"

correct all lines for getDistance() and see if it works.

const int dis1=SharpIR_1.getDistance(); //RIGHT"