Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Errors in motor declarations (http://www.chiefdelphi.com/forums/showthread.php?t=132151)

E Dawg 05-01-2015 11:23

Errors in motor declarations
 
We are getting errors in all of our motor constructors. It reads: "The type 'Talon' must implement the pure virtual method 'SpeedController::Set'." Essentially, we are being told that Set is not being overridden, yet it is overridden. Has anyone else run into this and solved it? Or does anyone have a solution?

Our constructor looks like this:
Quote:

motor1 = new Talon(0);
Thanks.

Cel Skeggs 05-01-2015 11:55

Re: Errors in motor declarations
 
If it isn't too big, can you post your entire file? It could help diagnose the problem.
If it is too big to post, could you try creating a new minimal project, make sure that it exhibits this problem, and post the entire code of that?

Joe Ross 05-01-2015 12:00

Re: Errors in motor declarations
 
Is the error being reported by the Eclipse C++ syntax checker, or when you are building the program? If it is the former, try to rebuild the index per https://wpilib.screenstepslive.com/s...ildingTheIndex

E Dawg 05-01-2015 13:18

Re: Errors in motor declarations
 
Fixed it! We uninstalled and reinstalled everything. There must have been a problem with the program finding the WPI libraries.

ejb1123 05-01-2015 13:19

It need a type to make the varuble. I have c++ experience with QT but this is my first year in FRC and I haven't worked with the WPI 2015 C++ library yet. I am not sure if they have to be defined as a pointer. Below is how I would define it.
Code:

Talon *motor1 = new Talon(0);


All times are GMT -5. The time now is 02:42.

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