[Solved] Bad Math with value multiplied by -1?
Although you believe your code is similar to this: #include <iostream> double f() { double x = 3; return x * -1; } int main() { std::cout << f() << std::endl; } The code you have actually takes the type of x from the result of a vector’s size() – this returns a std::size_t: #include … Read more