Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Lunkan

Pages: [1]
1
Window / I can't seem to use the function isOpen?
« on: December 22, 2022, 03:53:43 pm »
So Im trying to use the command isOpen but im getting an error thrown at me. Im following a youtube tutorial trying to learn the basics of SFML and now im suddenly stuck with this error. I have checked my linking and it seems to be correct as I followed another video for that. This is the error im getting:
 Exception thrown at 0x00EE3710 in Sfml.exe: 0xC0000005: Access violation reading location 0x0000000C.

This is the code causing the error:
const bool Game::running() const{ //In cpp file
   return this->window->isOpen();
}
const bool running() const; //In header file

Video used for linking: https://www.youtube.com/watch?v=_VgRjlvGpPk&ab_channel=BenjaminBlodgett



Okay I solved it not to long after posting..... I simply forgot to set any value to window. It was a nullptr.


Pages: [1]