InfraredSensor->Get() has no parameters, so nothing needs to go inside the parentheses. I think that was the question.
You want something like
Code:
if (InfraredSensor->Get())
myRobot->Set(0.0);
This will set myRobot to 0 when the infrared beam is interrupted, assuming Get() returns true when interrupted. If it returns false, you'll have to flip it.