Quote:
Originally Posted by RobHammann
...using something like
grabSolenoid.set(DoubleSolenoid::kForward);
it says "request for member 'set' in '(((Robot*)this))->Robot::grabSolenoid', which is of pointer type 'DoubleSolenoid' (maybe you meant to use '->' ?)"
where do I put the ->?
|
You have declared grabSolenoid as a
pointer to a double solenoid object. The member functions like Set() only work on an actual object. You need to dereference the pointer before you can call the function. The '->' is a small bit of syntax convenience that lets you dereference the pointer and do the equivalent of a '.' at the same time.
Just replace the '.' with '->' between the variable name and the function name.