yes, try this
Code:
#include "WPILib.h"
class RobotDemo:public SimpleRobot
{
RobotDrive myRobot;
Joystick stick;
public:
RobotDemo():
myRobot(1,3), stick(1){}
void Autonomous()
{
myRobot.Drive(1,0);
Wait(1);
myRobot.Drive(0);
}
void OperatorControl()
{
while (IsOperatorControl(){
myRobot.ArcadeDrive(stick);
}
}
};
this creates them as accessable inside all the functions in the class