my list is in namespace functions and is named currentfunctions and I get the error
error: no match for 'operator=' in 'it = Functions::currentfunctions.std::list<_Tp, _Alloc>::begin [with _Tp = Function, _Alloc = std::allocator<Function>]'|
heres the code:
the class
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
class Function{
std::wstring name, function, units;
public:
Function(std::wstring,std::wstring,std::wstring);
std::wstring getname(){ return name;}
std::wstring getfunction(){ return function;}
std::wstring getunits(){ return units;}
Function operator = (Function);
};
Function::Function(std::wstring newname, std::wstring newfunction, std::wstring newunits){
name = newname;
function=newfunction;
units=newunits;
}
Function Function::operator=(Function param){
Function temp(param.getname(),param.getfunction(),param.getunits());
return temp;
}