I'm trying to write a helper .h file with some operators.
Mainly something like this
QVector3D &operator=(const someDataObj&data){
QVector3D out(data[0],data[10],data[12]);
return out;
}
But when ever I try it I get : error C2801: 'operator =' must be a non-static member
if I try :
Vector3D operator=(QVector3D &left, const someDataObj &other) {}
I get : error C2801: 'operator =' must be a non-static member
I'm just lost... how can I properly do it ?
Edit: I forgot to mention, its main usage will be converting of data from libraryA to libraryB.