View Single Post
  #7   Spotlight this post!  
Unread 18-12-2008, 18:42
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
Re: Pointers and Tank Drive?

#include "WPILib.h"



class RobotDemo : public SimpleRobot
{
RobotDrive *Bot; // robot drive system
Joystick *stickRight;
Joystick *stickLeft;
DriverStation *ds; // driver station

public:
RobotDemo(void)
{
ds = DriverStation::GetInstance();
Bot = new RobotDrive(1, 2); // create robot drive base
stickRight = new Joystick(1);
stickLeft = new Joystick(2);
GetWatchdog().SetExpiration(100);
}



and the Operator:

void OperatorControl(void)
{
while (1)
{
Bot.TankDrive(&stickLeft, &stickRight);
}
}
};

START_ROBOT_CLASS(RobotDemo);



I edited it, but...

C:/WindRiver/workspace/ll/MyRobot.cpp:38: error: request for member `TankDrive' in `((RobotDemo*)this)->RobotDemo::Bot', which is of non-class type `RobotDrive*'

Thats what it says... If its not too much to ask, whats wrong??
__________________
Team 375: The Robotic Plague
Current Robot: I-Chihuahua
Last Event: Big Apple Breakaway