When attempting to refer to Albert.h class in my Game.cpp, I'm getting
repos\Pong\Game.h(23,9): error C3646: 'albert': unknown override specifier
repos\Pong\Game.h(23,15): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Game.h
#pragma once
#include <iostream>
#include <ctime>
#include "Include.h"
#include "Ball.h"
#include "Player.h"
#include "Albert.h"
class Game
{
private:
sf::VideoMode videoMode;
sf::RenderWindow* window;
sf::Event event;
Ball ball;
Player player;
Albert albert;
//Game Logic
bool endGame;
//Private Functions
void initVariables();
void initWindow();
public:
//Constructor / Destructor
Game();
virtual ~Game();
//Accesssors
bool const isRunning() const;
//Function
void PollEvents();
void Update();
void UpdateCollisions();
void Render();
};
Albert.h
#pragma once
#include "Game.h"
class Albert
{
private:
sf::RectangleShape shape;
Ball ball;
float moveSpeed;
void initVariables();
void initShape();
public:
Albert();
virtual ~Albert();
void Update();
void Brain();
void Render(sf::RenderTarget* target);
};
I've gotten this a couple of times and usually fix it by changing my includes around but with this, I'm unable to without breaking something else. And everything I've searched so far has talked about stop using namespaces and all of that while I'm not using any.