I think your major problem is that you haven't read any of the documentation on C++ coding:
http://first.wpi.edu/Images/CMS/First/FRC1718Docs.zip There's a nice packet of information there. Here's how to fix your program:
Code:
void OperationControl(void)
{
GetWatchdog().SetEnabled(true);
while(IsOperatorControl())
{
servo.Set(1.0);
GetWatchdog().Feed();
}
}
The Set method takes a value from 0.0 to 1.0 (full left to full right)
Also, make sure you have a jumper set on the sidecar next to the pwm output for the servo.