Go to Post We're all such geeks...not that's that a bad thing. - IMDWalrus [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 10-02-2010, 11:39
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
DriverStationEnhancedIO compile error

I copied this out of WPI_Robotics_Library_Users_Guide.pdf and put it in the constructor:

Code:
    DriverStationEnhancedIO &dseio = DriverStation.GetInstance().GetEnhancedIO();
Here is the compile error:

Code:
C:/WindRiver/workspace/BuiltinDefaultCode/BuiltinDefaultCode.cpp: In constructor `BuiltinDefaultCode::BuiltinDefaultCode()':
C:/WindRiver/workspace/BuiltinDefaultCode/BuiltinDefaultCode.cpp:99: error: expected primary-expression before '.' token
C:/WindRiver/vxworks-6.3/target/h/WPILib/DriverStationEnhancedIO.h:127: error: `virtual DriverStationEnhancedIO::~DriverStationEnhancedIO()' is private
C:/WindRiver/workspace/BuiltinDefaultCode/BuiltinDefaultCode.cpp:99: error: within this context
C:/WindRiver/workspace/BuiltinDefaultCode/BuiltinDefaultCode.cpp:99: warning: unused variable 'dseio'
C:\WindRiver\vxworks-6.3\host\x86-win32\bin\make.exe: *** [BuiltinDefaultCode_partialImage/Debug/Objects/BuiltinDefaultCode/BuiltinDefaultCode.o] Error 1
Is the pdf file wrong, or I did something wrong?
Reply With Quote
  #2   Spotlight this post!  
Unread 10-02-2010, 16:51
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: DriverStationEnhancedIO compile error

I think this means the PDF is incorrect.

It should look more like this:
Code:
DriverStationEnhancedIO &dseio = DriverStation::GetInstance()->GetEnhancedIO();
DriverStation::GetInstance() returns a pointer, so it is necessary to use ->.
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award
Reply With Quote
  #3   Spotlight this post!  
Unread 10-02-2010, 18:59
oddjob oddjob is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Earth
Posts: 118
oddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to beholdoddjob is a splendid one to behold
Re: DriverStationEnhancedIO compile error

Thanks. This now compiles but I can't test it tonight due to snow closing:

Code:
  DriverStationEnhancedIO *m_dseio;
...
  m_dseio = &DriverStation::GetInstance()->GetEnhancedIO();
Is there somewhere to report documentation errors? It would be great to get the pdf's fixed.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FTC]: Compile error saaby FIRST Tech Challenge 3 17-02-2009 17:14
MPLAB Compile Error with MPLIB GRS Programming 2 04-11-2008 10:31
compile error Chuck Merja Programming 3 17-02-2005 15:02
InterruptVectorLow error when we compile Redneck Programming 5 02-02-2005 22:57
Compile error blindguyinanorg Programming 4 12-02-2004 19:49


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

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