I have this short code over here which I want to use to display a motor’s position to the terminal.
void printPos()
{
while(true)
{
printf("leftFront.position(degrees)\n");
wait(1,seconds);
}
}
int main()
{
vexcodeInit();
printPos();
}
Of course, this just writes leftFront.position(degrees) in the terminal every second. However, when I try typing
void printPos()
{
while(true)
{
printf(leftFront.position(degrees));
wait(1,seconds);
}
}
It gives me an error on printf, saying [clang] No matching function to call to ‘printf’.
tldr, how can I use the terminal to display my motor’s position?