For some reason it doesn't see my overloaded operators!

I was setting up operators for a struct in the header file of the class that needed it.

I tried to get it to recognize my operators but it absolutely rejected every attempt. I even asked the AI god and its confused.

Please help, otherwise I’ll have to do some pretty nasty code to an okay project to workaround.

This topic has been moved from International to Programming & Scripting: C++.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Hopefully, this category change will help to get an answer. In the meantime, good luck and happy developing! :slight_smile:

Yeah figured that out with my second question on a different post but didn’t really know how to switch it.

Thanks Cheers!

What do you mean by “can’t see”? If you are you getting compiler errors, you should include those.

Based on what you’ve currently posted, the only possibility that I can offer is that it’s because you’re missing a “const” specifier on each of those operator overloads. This would likely cause a compiler error or other issue because for something like:

void func( const FDialogueImportData &Thing1, const FDialogueImportData &Thing2)
{
     if (Thing1 == Thing2)
             ...
}

the compiler wouldn’t be able to find an operator that it would be legal to call.