No, your code just declared four Victor pointers but you did not instantiate them. Regarding the Attack3 joystick, can't help you on that since I am not familiar with it.
Code:
#include "WPILib.h"
class RobotDemo : public SimpleRobot
{
Victor *leftFrontMotor;
Victor *leftRearMotor;
Victor *rightFrontMotor;
Victor *rightRearMotor;
RobotDrive *drive;
Joystick *Attack1;
Joystick *Attack2;
public:
RobotDemo(void)
{
leftFrontMotor = new Victor(1);
leftRearMotor = new Victor(2);
rightFrontMotor = new Victor(3);
rightRearMotor = new Victor(4);
drive = new RobotDrive(leftFrontMotor,leftRearMotor,rightFrontMotor,rightRearMotor);
Attack1 = new Joystick(1);
Attack2 = new Joystick(2);
GetWatchdog().SetExpiration(0.1);
drive->SetExpiration(0.1);
}
void Autonomous(void)
{
}
void OperatorControl(void)
{
GetWatchdog().SetEnabled(true);
drive->SetSafetyEnabled(true);
while (IsOperatorControl())
{
drive->MecanumDrive_Cartesian(Attack1->GetX(),Attack1->GetY(),Attack2->GetTwist());
Wait(0.005);
}
}
};
START_ROBOT_CLASS(RobotDemo);