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

Author Topic: ACCESS VİOLATİON ERROR?  (Read 629 times)

0 Members and 1 Guest are viewing this topic.

ichnichtibo

  • Newbie
  • *
  • Posts: 1
    • View Profile
ACCESS VİOLATİON ERROR?
« on: August 11, 2023, 01:50:07 pm »
#pragma once

#include <SFML/Graphics.hpp>
#include <SFML/Network.hpp>
#include <SFML/System.hpp>
#include <SFML/Audio.hpp>
#include <SFML/Window.hpp>

/*
        Class that acts as the game engine
        Wrapper Class
*/

class Game
{
private:
        //Variables
        //Window
        sf::RenderWindow* window;
        sf::VideoMode videoMode;
        sf::Event ev;
       
        //Private functions
        void initializeVariable();
        void initWindow();

public:
        // Constructor and Deconstructor
        Game();

        virtual ~Game();
        // Accesors

        const bool isRunnig() const
        {
                return this->window->isOpen(); [b]in here it says "Uncaught exception occurred on SFML.exe at address 0x5539836A (sfml-window-d-2.dll): 0xC0000005: Read access violation to location 0x0000000C." i cant get it[/b]
        };
       
        //  Functions
        void handleEvents();
        void update();
        void render();
};
 

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: ACCESS VİOLATİON ERROR?
« Reply #1 on: August 11, 2023, 04:51:20 pm »
Definitely need to initialize your pointer  ???

 

anything