I've an issue when i try to call a constructor that require a special implementation of an interface.
To make it cleaner now, here's the code :
I_Window* window = new GLFW_Window(800,600,"Learn OpenGL");
I_Input_Manager* manager = new GLFW_Input_Manager(*window);
And the class implementing the interface is like so :
class GLFW_Input_Manager : public I_Input_Manager
{
private:
GLFW_Window& window_ref;
public:
GLFW_Input_Manager(GLFW_Window& window_ref_);
virtual ~GLFW_Input_Manager();
//...
};
The error return by the compiler is :
error: no matching function for call to ‘GLFW_Input_Manager::GLFW_Input_Manager(I_Window&)’
I_Input_Manager* manager = new GLFW_Input_Manager(*window);
I understand the problem, my constructor need as argument an "I_Window" but for this special implementation, i need a reference to a GLFW_Window because the real implementation gonna use the GLFWwindow.
So how can i solve this problem ?
Thanks !