I am creating an engine:
#include "Engine.h"
class Engine{
GraphicsManager graphicsManager;
public:
//Other managers
void Start(){
graphicsManager.Start();
}
void Shutdown(){
graphicsManager.Shutdown();
}
void RunGameLoop( ){
}
// Manage timestep
};
#ifdef ENGINE_H
#define ENGINE_H
#include "GraphicsManager.h"
#include "spdlog/spdlog.h
#pragma once
class Engine{
private:
GraphicsManager graphicsManager;
InputManager inputManager;
AudioManager audioManager;
public:
Engine();
~Engine();
//start up managers
void Start();
//runs game loop
void RunGameLoop();
//shuts down managers
void Shutdown();
};
#endif // ENGINE_H
...and keep getting an undeclared identifier error even though i declare the graphic manager in the header class:
'graphicsManager': unknown override specifier
src\Engine.cpp(6): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
src\Engine.cpp(15): error C2065: 'graphicsManager': undeclared identifier
src\Engine.cpp(22): error C2065: 'graphicsManager': undeclared identifier
I tried changing it to a pointer, puting the #Includes in the cpp, and I expect it to not give me the error an compile correctly.