Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - pechhenka

Pages: [1]
1
System / Assigning vectors
« on: July 27, 2020, 08:29:26 pm »
Hello! I would not say that I am new to C ++, but this is the first time I have encountered this. I have the following code:

sf::Vector2f v(5.f, 5.f);
v = -v

And the compiler writes to me that I cannot perform such an assignment, because I allegedly assign different data types, namely sf::Vector2f= sf::Vector2<float>;

Help me please, how can I invert the signs of the axes of a vector.



P.S. ok, i found a error) i passed v as const sf::Vector2f& v, and of course i can't change it ;D ;D

Pages: [1]
anything