Best way to compare actors in C++?

This is actually quite irritating, as my original code actually works correctly this way (code I had prior to creating this post)… Thanks for all the help!