1
Window / Pointer to sf::Window
« on: June 30, 2011, 12:41:00 pm »Code: [Select]
class a
{
sf::Window* m_Window; // class a member
a()
{
m_Window = new sf::Window; // I make new window object
m_Window.Create(...); // and creating window
}
error: request for member 'Create' in System*)this)->System::m_Window', which is of non-class type 'sf::Window*'|
Why can't I work with pointers? When I divide project in multiple classes, I can't pass Window to them and read pressed keys.
Code: [Select]
m_Window.GetInput().IsKeyDown( sf::Key::Left )