Go to Post Our robot throws custom $5.50 FIRST Frisbees at a rate of 75 discs per minute and a speed of ~32 feet per second. It costs over $80 to feed our robot for 12 seconds. - Woolly [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-12-2016, 20:20
Robodragons4630 Robodragons4630 is offline
CHS Robodragons Programming
AKA: Noah Jarnigan
FRC #4630 (Robodragons)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Clinton, Tennessee
Posts: 15
Robodragons4630 is an unknown quantity at this point
Robot(): is private error being thrown

My code is throwing the error "Description Resource Path Location Type
'Robot::Robot()' is private Robot.cpp /ittest/src line 24 C/C++ Problem" and i have absolutely no idea where to start in fixing it. Here's my code. http://pastebin.com/N7kJ7454
Reply With Quote
  #2   Spotlight this post!  
Unread 18-12-2016, 21:04
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 296
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: Robot(): is private error being thrown

First, make sure you understand visibility. Here's a stackoverflow question I found: http://stackoverflow.com/questions/8...ed-inheritance
You simply need to make the constructor public
Code:
class Robot: public IterativeRobot
{
private:
    // some stuff

public:
    Robot() // etc
    // ...
}
__________________
Creator of SmartDashboard.js, an extensible nodejs/webkit replacement for SmartDashboard


https://ligerbots.org
Reply With Quote
  #3   Spotlight this post!  
Unread 18-12-2016, 21:29
Robodragons4630 Robodragons4630 is offline
CHS Robodragons Programming
AKA: Noah Jarnigan
FRC #4630 (Robodragons)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Clinton, Tennessee
Posts: 15
Robodragons4630 is an unknown quantity at this point
Re: Robot(): is private error being thrown

Quote:
Originally Posted by euhlmann View Post
First, make sure you understand visibility. Here's a stackoverflow question I found: http://stackoverflow.com/questions/8...ed-inheritance
You simply need to make the constructor public
Code:
class Robot: public IterativeRobot
{
private:
    // some stuff

public:
    Robot() // etc
    // ...
}
I just tried that but it's still throwing the error. I think it's a glitch with eclipse because no matter how much i move around the code it always appears on line 24.
Reply With Quote
  #4   Spotlight this post!  
Unread 18-12-2016, 22:27
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 800
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Robot(): is private error being thrown

Quote:
Originally Posted by Robodragons4630 View Post
I just tried that but it's still throwing the error. I think it's a glitch with eclipse because no matter how much i move around the code it always appears on line 24.
Try saving your code before re-building.
Reply With Quote
Reply


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 10:03.

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