I’m using SFML for input system in my application.
size_t WindowHandle;
WindowHandle = ...; // Here I get the handler
sf::Window InputWindow(WindowHandle);
const sf::Input *InputHandle = &InputWindow.GetInput(); // [x] Error
At the last lines I have to get reference for the input system.
Here is declaration of GetInput from documentation:
const Input & sf::Window::GetInput () const
The problem is:
>invalid conversion from ‘const sf::Input*’ to ‘sf::Input*’
What’s wrong?
Is there a special reason why you want to have a pointer rather than a reference?
If not, you could try this:
This will return you a reference to your Input handle.
Btw, this worked for me:
Output : 4
Don’t know why your compiler doesn’t want you to point the reference.