You need to always check the event type and you shouldn't mix events and real-time input (i.e. sf::Mouse::getPosition().
So something like this:
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
// ...
else if (event.type == sf::Event::MouseWheelScrolled && event.mouseWheelScroll.wheel == sf::Mouse::VerticalWheel)
{
if (event.mouseWheelScroll.delta > 0) {
std::cout << "Wheel in " << std::endl;
}
else
{
std::cout << "Wheel out " << std::endl;
}
}
else if (event.type == sf::Event::MouseButtonPressed && event.mouseButton.button == sf::Mouse::Left)
{
std::cout << "Left Mouse Button" << std::endl;
}
// ...
}