Go to Post Start up the rumor mill... - frcguy [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 10-11-2012, 21:07
JPruim JPruim is offline
Registered User
FRC #4014
 
Join Date: Mar 2012
Location: United States
Posts: 5
JPruim is an unknown quantity at this point
What does the ampersand (&) mean in errors?

I get the error stack as follows when trying to compile the following code:

Code:
C:/Users/Josh/WindRiver/workspace/SimpleTemplate/limitSwitch.cpp: In constructor `limitSwitch::limitSwitch(UINT32)':
C:/Users/Josh/WindRiver/workspace/SimpleTemplate/limitSwitch.cpp:8: error: no matching function for call to `DigitalInput::DigitalInput()'
C:/WindRiver/vxworks-6.3/target/h/WPILib/DigitalInput.h:21: note: candidates are: DigitalInput::DigitalInput(const DigitalInput&)
C:/WindRiver/vxworks-6.3/target/h/WPILib/DigitalInput.h:24: note:                 DigitalInput::DigitalInput(UINT8, UINT32)
C:/WindRiver/vxworks-6.3/target/h/WPILib/DigitalInput.h:23: note:                 DigitalInput::DigitalInput(UINT32)
C:/Users/Josh/WindRiver/workspace/SimpleTemplate/limitSwitch.cpp:9: error: no match for call to `(DigitalInput) (UINT32&)'
C:\WindRiver\vxworks-6.3\host\x86-win32\bin\make.exe: *** [SimpleTemplate_partialImage/Debug/Objects/SimpleTemplate/limitSwitch.o] Error 1
Build Failed in Project 'SimpleTemplate' (Process Exit Value was 2):   2012-11-10 18:06:08   (Elapsed Time: 00:02)
when compiling

Code:
#include "WPILib.h"

class limitSwitch
{
	DigitalInput di; // robot drive system

public:
	limitSwitch(UINT32 p){
		di(p);
	}
};
Why is there an & symbol after UINT32? in the 'No match for call to...' error?
Reply With Quote
 


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 12:54.

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