I'm a hobbyist programmer self teaching C++. I'm doing ok with the C part but the object oriented part is confusing me. For example I'm currently trying to learn to use the sfml package. I understand that you can declare a VideoMode object like this:
sf::VideoMode vm(1920, 1080);
Clear, simple and understandable. But now to get the current desktop mode the documentations tells me to do this:
vm = sf::VideoMode::getDesktopMode();
Why the nested namespace resolution operators? It's like there are nested objects here but why would you do it that way? Making it even more confusing I experimented and found that this also works:
vm = vm.getDesktopMode();
The getFullScreenModes() also uses nested namespace resolution operators. But something like vm.getFullscreenMode does not work here.
In general I'm confused about when and why to use the namespace resolution thingy and I am having trouble parsing the documentation.