Original Post
Hello, Trying to make a game but having a strange issue with VC++: Using VC++, SDL, Opengl. I make a global array: char Map[100]; Then running the editor in a window starting up, Map[100] got filled with 0's from a file. Somewhere else I have a key(toggle) where I can change to fullscreen and back to window: case SDL_KEYDOWN: if (event.key.keysym.sym == SDLK_l){ windowreshape++; if (windowreshape == 1){SDL_SetVideoMode(window_width, window_height, bpp, SDL_OPENGL | SDL_GL_DOUBLEBUFFER | SDL_HWSURFACE | SDL_FULLSCREEN); // setting up Gl GL_Setup(window_width, window_height);} if (windowreshape == 2){SDL_SetVideoMode(window_width, window_height, bpp, SDL_OPENGL | SDL_GL_DOUBLEBUFFER | SDL_HWSURFACE); // setting up Gl GL_Setup(window_width, window_height); if (windowreshape == 2) windowreshape=0; } Toggling from fullscreen to window. But when to program starts map[]= filled with 0's After a toggle map[] is filled with all kind of values and it stays that way with all next toggles. But always the same strange values even after a new start en toggle. There are even floating point values but I'm using a only a "char" here. map[] has nothing to do with changing screens. What is happening here???? Memory leak???? Anyone? Thanks, RenRan