View Single Post
  #1   Spotlight this post!  
Unread 21-03-2013, 07:24
austpet1230's Avatar
austpet1230 austpet1230 is offline
Registered User
FRC #4459 (Leotechs)
Team Role: Leadership
 
Join Date: Mar 2013
Rookie Year: 2011
Location: United States
Posts: 9
austpet1230 is an unknown quantity at this point
A few questions about C++

Hello everyone,

I am part of a rookie (well not anymore) team and in the 2014 FRC Competition, we plan on using C++ to program the robot.

My first question is C++ or Java better to program in?

My second question is that is this code appropriate to initialize two joysticks?
Code:
#include "WPILib.h"

class RobotDemo : public SimpleRobot
{
	RobotDrive myRobot; // robot drive system
	Joystick stick1, stick2; // only joystick

public:
	RobotDemo(void):
		myRobot(1, 2),	// these must be initialized in the same order
		stick1(1),		// as they are declared above.
		stick2(2)
	{
		myRobot.SetExpiration(0.1);
	}
Thank you to everyone and anyone who answers my question.

Austin P. //Programming Captain | The Leotechs FRC#4459
Reply With Quote