Only use the .key.code value of your event when it is relevant: after you have checked that your event type is KeyPressed or KeyReleased, like in the
tutorial.
If you don't use curly brackets around your if, only the first instruction following the if will be dependent of the result of your condition.
if (event.key.code == 100)
accelRight = true;
std::cout << "accelRight is now true";
This thing you wrote is equivalent to:
if (event.key.code == 100) {
accelRight = true;
}
std::cout << "accelRight is now true";
Your std::cout will always be called, whether the if is true or false...
if (sf::Event::KeyReleased)
This doesn't mean anything
It's literally like
if (6) or whatever the value of the KeyReleased enum is.