   SDL Input Problem
  Hi everybody!The problem is that I don''t get the input event...And one more problem: if I declare the event variable as just SDL_Event it says that I did not declare it and I get error...So I turned it into static and everything is all right now...Here is my code: int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,   PSTR szCmdLine, int iCmdShow){bool bDone = false;//window = new CWindow(800, 600, 32, true);log = new CLog("log.htm");settings = new CSettings(window, log);static SDL_Event event;while(!bDone){switch(event.type){case SDL_KEYDOWN:bDone = true;log->Log("Key press detected\n");break;case SDL_KEYUP:log->Log( "Key release detected\n");break;default:log->Log( "The type of the event is: %d", event.type);break;}}return 0;} 
  Don''t you need a window for this?!   "C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"  ;  Why are you using WinMain() in an SDL app?Anyways, you're never polling for events. Check out SDL_PollEvent().Not sure about your other problem though.Edit: Oh yeah, uh, what's the CWindow? If that sets up an SDL window, then cool. If not, it'll need to. Either way, you oughta uncomment it.   [edited by - BradDaBug on August 18, 2003 1:33:40 PM];  check the SDL homepage, they have great examples in the documentation of how to set up a window with SDL etc.and as asked, why are you using winmain? SDL is a crossplattform library. Just use regular int main(int argc, char *argv[])  and SDL converts to native stuff as WinMain  "No lies of sugar can sweeten the sournes of reality"}+TITANIUM+{ A.K.A. DXnewbie[onMIRC] ;  It''s the easiest way to supress the console, isn''t it?   [My site|SGI STL|Bjarne FAQ|C++ FAQ Lite|MSDN|Jargon]Ripped off from various people ;  isn''t there another way to supress the console?.. I think it''s an option you have to set in the compiler.why use SDL if you''re using WinAPI anyway? Win32 has already input and sound and it''s easy to set up a OGL window...whatever  "No lies of sugar can sweeten the sournes of reality"}+TITANIUM+{ A.K.A. DXnewbie[onMIRC] ;  If you''re using MSVC, simply make your project a "win32 application" rather than a "console application". This will get rid of the console and forward stdout and stderr into nice handy text files. 