error C2440 using adjacent_difference stl template function
I would like to use STL <numeric> adjacent_difference function in my program but I'm getting the error:
1>c:\program files\microsoft visual studio 8\vc\include\numeric(349) : error C2440: '=' : cannot convert from 'Csimple' to 'int'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called.
I have a <list> of Csimple's (udt) objects where I would calculate the differences (Csimple is a very simple class with only one int parameter called "firstInt").
simpleList.push_back(Csimple(10)); //fill the list with Csimple's objects
v_resItr = adjacent_difference(simpleList.begin(), simpleList.end(), res.begin());
I've also added the overloaded version of operator- and operator= as class members as suggest by errors provided by compiler