Hi im getting error when trying this code:
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
const float ballVelocity = 8.f;
struct Ball
{
Vector2f velocity(-ballVelocity, -ballVelocity);
};
I'm using SFML and doing it by a tutorial, and it is supposed to work, but Visual Studio sais that in this line:
Vector2f velocity(-ballVelocity, -ballVelocity);
Expected a type specifier.
(EDIT: to be clear Im trying to create object of Vector2)