I am currently working on a project that has several files and is a bit more complicated (in terms of maintaining inheritance rights). I am getting a compilation error, and I think this has something to do with links. Here is the error I get at compile time
videotodatastream.cpp: In member function ‘virtual void Wade::VideoToDataStream::getData(std::string&)’:
videotodatastream.cpp:33: error: no matching function for call to ‘Wade::VideoWrapper::getVideo(Letscher::Video (&)())’
videowrapper.h:10: note: candidates are: virtual void Wade::VideoWrapper::getVideo(Letscher::Video&)
Here is the line he complains about
Letscher::Video vid();
_vid.getVideo(vid);
_vid is the private data of an element of type VideoWrapper &
VideoWrapper& _vid;
VideoWrapper is a pure virtual base class with the following methods:
class VideoWrapper {
public:
virtual void setVideo(Letscher::Video& video) = 0;
virtual void getVideo(Letscher::Video& video) = 0;
};
The VideoWrapper child class that I actually use is RawVideo , and it looks like
class RawVideo : public VideoWrapper {
public:
RawVideo(Letscher::Video& video);
virtual void setVideo(Letscher::Video& video);
virtual void getVideo(Letscher::Video& video);
private:
Letscher::Video* _vid;
};
Wade::RawVideo::RawVideo(Letscher::Video& video): _vid(&video) {
}
void Wade::RawVideo::setVideo(Letscher::Video& video) {
*_vid = video;
}
void Wade::RawVideo::getVideo(Letscher::Video& video) {
video = *_vid;
}
, _vid.getVideo(vid), , vid RawVideo. - , , .
, .