Declaring Second Joystick

I have had issues attempting to make certain code only apply to the joystick in port 2, however it merely puts all the code into the first joystick. Any suggestions would be great!

Basically how do we declare a second joystick in C++.


class MyRobot: public SimpleRobot
{
    Joystick stick1;
    Joystick stick2;
 
    MyRobot(): stick1(1),
               stick2(2)
    {
    }
    ...
    void OperatorControl()
    {
        if (stick1.GetRawButton(1))
        {
        }
        else if (stick2.GetRawButton(1))
        {
        }
    }
};

Yeah, different numbers should be assigned to the joysticks.