hi i'm new to sfml/c++ can some one explain how
sf::VideoMode desktop = sf::VideoMode::getDesktopMode();
works? Hows doe it make an constructor equal an function?
If you check out the docs, getDesktopMode()'s definition is:
static VideoMode getDesktopMode ()
Initialising desktop like this invokes the copy constructor (Not the default constructor or the assignment operator), using the sf::VideoMode object returned by getDesktopMode() as the object to copy.