Hello everyone!
A new SFML user here. I was playing around with sf::RenderWindow as a member variable inside a class and noticed something; when I initialize window using init lists, it works:
SharpShooter::SharpShooter() : window(sf::VideoMode(680,480), "Rendering Area") { }
However, if I declare it inside the body of the c-tor like so:
SharpShooter::SharpShooter()
{
window(sf::VideoMode(680,480), "Rendering Area");
}
I get the following error;
error: no match for call to ‘(sf::RenderWindow) (sf::VideoMode, const char [12])’
FYI, window is neither a const member nor a reference.
This is might be more of a C++ question but I was curious and wanted to ask about it
Thanks in advance.