Event management in SDL

Hi all.

I have a bit of a problem compiling the following bit of code:

SDL_Event event;

while(SDL_WaitEvent(&event) >= 0)
{
if (event.type == SDL_Quit)
exit(0);
}

It gives the following error messages in VC 6.0:
D:\SOURCES\SDLWrap\testmain.cpp(22) : error C2446: ‘==’ : no
conversion from ‘void (__cdecl *)(void)’ to 'int’
This conversion requires a reinterpret_cast, a C-style cast or
function-style cast
D:\SOURCES\SDLWrap\testmain.cpp(22) : error C2040: ‘==’ : 'int’
differs in levels of indirection from ‘void (__cdecl *)(void)’

What am I missing here?!?!?

Thanks
Thomas

if (event.type == SDL_Quit)

DOH! Guess I found the problem myself! :slight_smile:

Thank myself(!) :-)On 27 Aug 00, at 23:52, @Thomas_Skovsende wrote: