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

Author Topic: I can't seem to use the function isOpen?  (Read 214 times)

0 Members and 1 Guest are viewing this topic.


  • Newbie
  • *
  • Posts: 1
    • View Profile
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.

« Last Edit: December 22, 2022, 04:06:04 pm by Lunkan »