Judging by the use of a capital in Get(), and that you posted to the C++ forum, I'm assuming you're using C++. System.out.println isn't a thing in C, the equivalent is printf(). An example:
Code:
// Top of file
#include <stdio.h>
...
// Inside your function
printf("%d\n", encoder1.Get());
The %d means we have an integer to print, and \n means to add a newline afterwards.
Look here for more info
One thing to note, however, is that excessive use of printf can sometimes flood the network and if this is being called every iteration, you'll get a ton of text in netconsole. I prefer to use the DriverStationLCD class, which will put the text on the right of the Operation tab of the driver station.
Code:
void OperatorControl(void)
{
DriverStationLCD *dslcd = DriverStationLCD::GetInstance();
...
while (IsOperatorControl())
{
dslcd->Clear();
...
dslcd->Printf(DriverStationLCD::kUser_Line1, 1, "Left Encoder: %d", encoder1->Get());
...
dslcd->UpdateLCD();
}
}
kUser_Line1 tells it which line to go on, 1 is the column to start in (generally 1), and the rest of it is called just like the regular printf(). Make sure you include the Clear() at the top of your loop, otherwise you can get some weird stuff in the text box.