|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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:
|
|
#2
|
|||
|
|||
|
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? |
|
#3
|
||||||
|
||||||
|
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
|
|
#4
|
|||
|
|||
|
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.
|
|
#5
|
|||
|
|||
|
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); Last edited by ejb1123 : 05-01-2015 at 16:29. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|