Okay I know with sfml you can screen capture:
sf::RenderWindow Screen;
Screen.capture();
What I don't know is how to capture the whole entire screen and not just the application and how to save the screen capture to a file.
sf::RenderWindow Screen;
Screen.capture().saveToFile("hehe.png");
Capture returns Image so you can do that. The extension is guessed from filename.
But you can't capture entire screen contents with SFML, just RenderWindow contents.