View Single Post
  #1   Spotlight this post!  
Unread Yesterday, 20:51
charlier999's Avatar
charlier999 charlier999 is offline
Registered User
FRC #1662 (Raptor Force Engineering)
Team Role: Programmer
 
Join Date: Feb 2017
Rookie Year: 2013
Location: Lodi, CA
Posts: 19
charlier999 is an unknown quantity at this point
Post Help! Timer Function in WPIlib.h

I found this inside of the WPI libary
PHP Code:
[url="http://first.wpi.edu/FRC/roborio/release/docs/cpp/classfrc_1_1Timer.html#a5f16e8da27d2a5a5242dead46de05d97"]http://first.wpi.edu/FRC/roborio/release/docs/cpp/classfrc_1_1Timer.html#a5f16e8da27d2a5a5242dead46de05d97[/url] 
I put the line
Code:
Timer::Timer();
into the code.
Timer::Timer() means
PHP Code:
Create a new timer object.

Create a new timer object and reset the time to zeroThe timer is initially not running and must be started
When I built the code in eclipse, it came back with this error >
Code:
error: cannot declare member function 'frc::Timer::Timer' within 'Robot'
  Timer::Timer();
               ^
I don't know why its doing this. If you know please tell.

Thx.
Reply With Quote