[smpeg] Difficulty porting SMPEG player's "update" from C to C++

Ed Sinjiashvili slimb at swes.saren.ru
Thu May 22 05:54:42 EDT 2003

On Thu, 22 May 2003 10:26:50 +0200 (MEST)
Doru-Catalin Togea <doru-cat at ifi.uio.no> wrote:

> I get the following error message:
> In file included from receiver.cpp:10:
> mpegPlayer.h: In function `void *MPEGPlayer::playMPEG (void *)':
> mpegPlayer.h:385: no matches converting function `update' to type `void
> (*) (struct SDL_Surface *, int, int, unsigned int, unsigned int)'
> mpegPlayer.h:219: candidates are: void MPEGPlayer::update (SDL_Surface
> *, int, int, unsigned int, unsigned int)
> Can anyone tell me what I am doing wrong?
It's hard to tell from the info you provided. 
Maybe you're trying to call member function 'update' from *static* method playMPEG without explicitly specifying object which is meant to be updated. Something like this?

void *MPEGPlayer::playMPEG(void *)
	update(bla, bla, bla); // static method - no implicit this here

In this case you must either declare 'update' as a static method or provide an instance to 
which update will be applied.

Anyway this looks like an off-topic to me. Contact me off-list if you please and I will try to help you.

-- Ed

More information about the smpeg mailing list