First thing I'm a java programmer and I know the classes translate generally between Java and C++ but I'm not sure of it, also syntax differences apply.
you would probably want to make a wrapper class for TankDrive that implements PIDOutput. The PIDWrite method would probably look something like this
Code:
public void PIDWrite(double d){
super.TankDrive(d,0);
}
if I remember the method correctly( We didn't use the FIRST class this year, we wrote our own drive system class) this should work. The PID loop is a P only loop, there is no need for the I and D in this instance(i.e. set them both to 0 in the code). You'd also need to make a wrapper class for the encoder to make it into a PIDSource. When you create the loop use your encoder class as the source the drive class you created as the output and try different values. One last thing is to remember to limit output to (-1.0,1.0) so you nothing bad happens to your speed controllers. One