Hi all,
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").

list<Csimple> simpleList;
simpleList.push_back(Csimple(10)); //fill the list with Csimple's objects
...
simpleList.push_back(Csimple(25));
vector<int> res(simpleList.size());
vector<int>::iterator v_resItr;
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

Csimple Csimple:perator -(Csimple op2)
{ return firstInt - op2.firstInt; }

Csimple Csimple:perator =(Csimple op2)
{ return firstInt = op2.firstInt; } //I'm not sure about the returned type, should be it an int?

I assume that I can use adjacent_difference also with user-defined type rather than just int; may be my assumption wrong?

Can someone help me, pls?

Many thanks in advance