|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Declaring DoubleSolonoid
Thanks, they do declare now, however...
Quote:
I really don't understand these pointers, when I try to set the solenoids 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 ->? |
|
#2
|
|||
|
|||
|
Re: Declaring DoubleSolonoid
Try grabSolenoid->Set(DoubleSolenoid::kForward);
|
|
#3
|
|||||
|
|||||
|
Re: Declaring DoubleSolonoid
Quote:
Just replace the '.' with '->' between the variable name and the function name. |
|
#4
|
|||||
|
|||||
|
Re: Declaring DoubleSolonoid
Yes. obj_ptr->elt is equivalent to (*obj_ptr).elt . That is, look up the actual field or method within the object that obj_ptr points to.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|