Go to Post I hate that every year people turn this competition into whining rather than winning. - Akash Rastogi [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 02-02-2013, 13:24
MI6 MI6 is offline
Registered User
FRC #4362
Team Role: Programmer
 
Join Date: Feb 2013
Rookie Year: 2011
Location: United States
Posts: 6
MI6 is an unknown quantity at this point
C++ Tank Drive Help

Please help with the errors and how to use a xbox controller with it!

I am getting a few errors with my code!
- Error: expected identifier before numeric constant
- Error: ISO C++ forbids declarations of parameter with no type
- Error: expected ',' or '...' before numeric constant
-Syntax Error


Code:

#include "WPILib.h"

class RobotDemo : public SimpleRobot
{
RobotDrive drivetrain(1, 2);
Joystick leftStick(1);
Joystick rightStick(2);

public:
RobotDemo()
{
GetWatchdog().SetEnabled(false);
}
void Autonomous()
{

}
void OperatorControl()
{
while (1) // loop forever
{
drive.Tank(leftStick, rightStick); // drive with the joysticks
Wait(0.005);
}
}
};

START_ROBOT_CLASS(RobotDemo);
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:55.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi