Cannot overload operator: 'operator <<' is ambiguous
I'm trying to overload the << operator, as per Rama's wiki tutorial about binary saving, so that I can save a custom object to binary.
I have created a separate header file for operator overloading called FileOperators.h which contains this:
So it should save the ObjectClass parameter (UClass*) to binary. And I have created a function trying to use that (I'm only putting the relavant line in here)
When I try to compile, I get the error: 'operator <<' is ambiguous
If I mouse over the << operator, it tells me why:
What am I doing wrong? I can't see that I'm doing anything differently from Rama's code...
asked Oct 24 '17 at 08:53 PM in C++ Programming
I figure it out.
The operator override needed to be
And the use of the operator needed to be:
answered Oct 25 '17 at 07:52 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here