You need to construct an actual platform, at the moment you are just trying to push a bunch of Vector2f
and Color
objects into your platforms_
vector.
For example
platforms_.push_back(Platform(sf::Vector2f(0, 680),
sf::Vector2f(40, 2000), sf::Color(100, 255, 40)));
The following should also work, the compiler will deduce the type from an initializer list and in the end call the same constructor as in the above example.
platforms_.push_back({sf::Vector2f(0, 680),
sf::Vector2f(40, 2000), sf::Color(100, 255, 40)});
However, in order to avoid the unnecessary copy here you should just emplace it on the vector rather than push it.
platforms_.emplace_back(sf::Vector2f(0, 680),
sf::Vector2f(40, 2000) , sf::Color(100, 255, 40));
What this does is construct the object in-place on the vector, see cppreference for more information about emplace_back.