Problems with my personal library

16 Sep 2012

Hello,

I'm having problems with my personal library, I do not know much c + +, so I'm struggling to find the error. I need help. The error is the following:

"expression must have class type" in file "/ main.cpp", Line: 112, Col: 4

I do not know to solve it, please help me.

Here is the link of my program: http://mbed.org/users/carlos_nascimento08/code/Andar_Linha_Reta_Robo_Claw_v1/

Thank you.

Carlos Alberto.

16 Sep 2012

You defined your RoboClaw object as:

RoboClaw Placa(void);

I don't know enough of C++ why it doesnt complain about that, and in which cases it would be allowed. However if you removed the (void) part it compiles fine. Now it does not see Placa as an object of the RoboClaw class. So just make it:

RoboClaw Placa;
16 Sep 2012

Thank you, Erik Olieman