If it compiled without error, that would have given some very bizarre results!
encLeftValue and encRightValue are long int variables. They are not pointers. If you try to treat them as pointers, you can accidentally overwrite RAM memory at "random" locations, causing weird corruption of memory belonging to other variables.
Imagine you have a friend who's birthday is coming soon. He will be 23 years old and you want to send a birthday card to him. He lives at 27, Canal Street. Do you send the card to 23 Canal Street? Of course you don't. Some random person you don't know will receive the card. That's what happens when you mix up a value with the address where that value resides.
In other words "please go away now, you're scaring me". I'm sorry, that was not intention. Sorry if I appeared condescending. I genuinely want you to understand, it's an important thing but but not easy to grasp at first.
No, the problem is that i didn't think before writing my question about the pointers...
encLeftValue and encRightValue are attributs of the class encoder_driver so it's okay to call a function of a class that change the value of an attributs of this class.
I believed that this function was used in a main and encLeftValue was declared in the main