Go to Post Never Underestimate the power of zip ties! - tonyargote [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-09-2016, 09:23 PM
tig567899's Avatar
tig567899 tig567899 is offline
Registered User
FRC #6070 (Gryphon Machine)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Mississauga
Posts: 29
tig567899 is an unknown quantity at this point
C++ Code Not working

I started a new code using c++, and I keep getting the error 'Invalid arguments' on the line:

START_ROBOT_CLASS(Robot);

Has someone experienced the same problem? Thanks.
  #2   Spotlight this post!  
Unread 01-09-2016, 10:13 PM
calcmogul's Avatar
calcmogul calcmogul is offline
WPILib Developer
AKA: Tyler Veness
FRC #3512 (Spartatroniks)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Santa Maria, CA
Posts: 51
calcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nice
Re: C++ Code Not working

Is that error being shown by the Eclipse indexer, the build console, or both? Did you start from an example project, and if so, which was it?
  #3   Spotlight this post!  
Unread 01-10-2016, 12:24 AM
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 985
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: C++ Code Not working

Quote:
Originally Posted by tig567899 View Post
I started a new code using c++, and I keep getting the error 'Invalid arguments' on the line:

START_ROBOT_CLASS(Robot);

Has someone experienced the same problem? Thanks.
Did you do the step "Rebuilding the index"?

http://wpilib.screenstepslive.com/s/...p-test-program
  #4   Spotlight this post!  
Unread 01-10-2016, 02:51 PM
ETGH ETGH is offline
Registered User
FRC #3045
 
Join Date: Jan 2016
Location: Redwood City
Posts: 1
ETGH is an unknown quantity at this point
Re: C++ Code Not working

We are having the same problem - and rebuilding the index doesn't fix it. Any other suggestions?
  #5   Spotlight this post!  
Unread 01-10-2016, 03:06 PM
calcmogul's Avatar
calcmogul calcmogul is offline
WPILib Developer
AKA: Tyler Veness
FRC #3512 (Spartatroniks)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Santa Maria, CA
Posts: 51
calcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nicecalcmogul is just really nice
Re: C++ Code Not working

I've found the indexer to not be the ultimate authority on whether one's C++ code compiles. Try building the project and seeing if that error prints in the build console as well. If it doesn't and the build succeeded, you can ignore the indexer.
  #6   Spotlight this post!  
Unread 01-12-2016, 11:40 AM
tig567899's Avatar
tig567899 tig567899 is offline
Registered User
FRC #6070 (Gryphon Machine)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Mississauga
Posts: 29
tig567899 is an unknown quantity at this point
Re: C++ Code Not working

The error is in the "Problems tab" on eclipse, and prevents the thing from building. I've tried rebuilding, and the problem occurs on every type of robot program (sample, iterative, example robot program).
  #7   Spotlight this post!  
Unread 01-12-2016, 02:50 PM
DamenStar DamenStar is offline
Registered User
FRC #1410
 
Join Date: Jan 2014
Location: Denver, CO
Posts: 4
DamenStar is an unknown quantity at this point
Re: C++ Code Not working

Normally the START_ROBOT_CLASS(Robot) statement should sit outside the main class normally in Robot.cpp. It should be located outside of any defined method:

Code:
#include "WPILib.h"
#include "Robot.h"

OI * Robot::oi = NULL;
DriveBase * Robot::drivebase = NULL;

void Robot::RobotInit(){
	oi = new OI();
	drivebase = new DriveBase();

}

START_ROBOT_CLASS(Robot);
It would be great if you post your code that you are having a problem with.

See ya in the bitstream

Last edited by DamenStar : 01-12-2016 at 05:07 PM.
  #8   Spotlight this post!  
Unread 01-14-2016, 09:38 AM
tig567899's Avatar
tig567899 tig567899 is offline
Registered User
FRC #6070 (Gryphon Machine)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Mississauga
Posts: 29
tig567899 is an unknown quantity at this point
Re: C++ Code Not working

I have screenshotted the thing but this forum doesn't let me post the image.

The code is below:
Code:
#include "WPILib.h"

class Robot: public IterativeRobot
{
private:

	void RobotInit()
	{
	}

	void AutonomousInit()
	{

	}

	void AutonomousPeriodic()
	{

	}

	void TeleopInit()
	{

	}

	void TeleopPeriodic()
	{

	}

	void TestPeriodic()
	{

	}

};

START_ROBOT_CLASS(Robot);
The error is: Invalid arguments', line 38, which is the START_ROBOT_CLASS(Robot); line.
Closed Thread


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 04:47 AM.

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