View Single Post
  #1   Spotlight this post!  
Unread 17-12-2008, 22:05
Straberrie's Avatar
Straberrie Straberrie is offline
The Plague
AKA: Rebecca
FRC #0375 (Robotic Plague)
Team Role: Programmer
 
Join Date: Feb 2008
Rookie Year: 2007
Location: New York
Posts: 59
Straberrie will become famous soon enough
Pointers and Tank Drive?

Hi! I am trying to program a Tank drive and am using the programming guide for C++ as well as the Simple Template found in File - New - Example etc... in the Workbench.

In the programming guide, the Operator control code looks like this

void OperatorContol (void)

{
while (1)
{
drivetrain.Tank (&stick1, &stick2);
}
}

and well, the header included in the program is "WPILib.h"; I have the same header included and I have the variables defined exactly the way they are defined in the guide, but when I try to build the project, it states the following
:C:/WindRiver/workspace/SimpleTemplate/MyRobot.cpp:31: error: `stick1' undeclared (first use this function):

How do pointers work?? In the guide, the joystick and pointer explanation is omitted *at least in the one I have, sorry if i skipped something*. So, is there anything I can read about pointers?? Or programming tank drive? Because I can't figure out whats wrong! *and yes, I am sorta kinda new to this, so if I made a silly error or am asking something stupid, sorry*

Thank you!!!!!!!!!
__________________
Team 375: The Robotic Plague
Current Robot: I-Chihuahua
Last Event: Big Apple Breakaway