Some uncompiled code:
Code:
DriverStationLCD ds = DriverStationLCD::GetInstance();
int val = 42;
ds.Printf(DriverStationLCD::kUser_Line1, "My Value is: %d", val);
ds.UpdateLCD(); // Call at the end of teleop periodic if you're doing multiple printfs.