I read the part about the negate function on this website and since most of it i don't understand how to read i need a little help understanding what's wrong with my code.
@gold
I think your confusion stems from trying to use a function object (std::negate) for a single value, rather than in an algorithm on a range of values as it is designed for. http://www.cplusplus.com/reference/algorithm/
As for negating a single value, its as simple as placing a minus sign before it.