overloading binary + operator
I need some help or a suggestion please
I have a template class in which I am trying to implement the following:
myClass + 'any type variable';
where 'any type variable' lets say for this example is '10' is added to a private member vector (called temp) in myClass
So say before the vector was 5,7,8 the (+ 10) would just add 10 to the end of the vector so it would now have 5,7,8,10
I also need to be able to chain the operation so
myClass + 10 + 11 + 12; would result in:
5,7,8,10,11,12
Code:
template<typename T>
myClass<T> operator + (***WHAT GOES HERE**)
{
temp.push_back( **WHAT GOES HERE**);
return *this;
}
any help would be appreciated