|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
![]() The WPILib documentation won't explain it well enough for me. It says: virtual void GetDescription (std: stringstream &desc) const =0I have no idea what the 'std: stringstream &desc' and 'const =0' parts mean. Can someone explain? |
|
#2
|
|||
|
|||
|
Re: Syntax for 'virtual void GetDescription'?
Some of my post was accidentally converted to an Emoji.
I MEANT 'std::ostringstream &desc' |
|
#3
|
||||
|
||||
|
Re: Syntax for 'virtual void GetDescription'?
Which class is this method from?
|
|
#4
|
|||
|
|||
|
Re: Syntax for 'virtual void GetDescription'?
Quote:
GetDescription takes a reference to an ostringstream. const = 0 means that the method is pure virtual (ie, it must be implemented in subclasses). So, you are trying to do something with an interface, not the implementation. |
|
#5
|
|||||
|
|||||
|
Re: Syntax for 'virtual void GetDescription'?
Code:
virtual void GetDescription (std::ostringstream &desc) const =0 Code:
virtual Code:
void Code:
GetDescription Code:
(std::ostringstream &desc) Code:
const Code:
=0 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|