+ 1
Own operator definition
Is it possible to define my operator? It should base on variable and type, and return bool. I would like to create my C++ version of instanceof.
1 Odpowiedź
+ 3
you can't define your own operator in C++.
A work around is to use dynamic_cast as explained here
http://stackoverflow.com/questions/351845/finding-the-type-of-an-object-in-c