Input system reference trouble

Posted by Ockonal on Stack Overflow See other posts from Stack Overflow or by Ockonal
Published on 2010-05-29T12:28:55Z Indexed on 2010/05/29 12:32 UTC
Read the original article Hit count: 326

Filed under:
|
|
|

Hello, 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?

© Stack Overflow or respective owner

Related posts about c++

Related posts about conversion